]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack_ipv6: fix tracking of ICMPv6 error messages containing fragments
authorPatrick McHardy <kaber@trash.net>
Sun, 26 Aug 2012 17:13:59 +0000 (19:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 30 Aug 2012 01:00:11 +0000 (03:00 +0200)
commit38688b45e0bfcf5947199911e54e1114eeaa0f00
tree9d31901b188530c740a8b3243580c3bd4de4563a
parentfc955c77938d25a90891de6c293fa64f9ff46709
netfilter: nf_conntrack_ipv6: fix tracking of ICMPv6 error messages containing fragments

ICMPv6 error messages are tracked by extracting the conntrack tuple of
the inner packet and looking up the corresponding conntrack entry. Tuple
extraction uses the ->get_l4proto() callback, which in case of fragments
returns NEXTHDR_FRAGMENT instead of the upper protocol, even for the
first fragment when the entire next header is present, resulting in a
failure to find the correct connection tracking entry.

This patch changes ipv6_get_l4proto() to use ipv6_skip_exthdr() instead
of nf_ct_ipv6_skip_exthdr() in order to skip fragment headers when the
fragment offset is zero.

Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c