]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nf_conntrack: fix incorrect classification of IPv6 fragments as ESTABLISHED
authorPatrick McHardy <kaber@trash.net>
Wed, 7 Mar 2007 21:34:42 +0000 (22:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Mar 2007 18:26:46 +0000 (11:26 -0700)
[NETFILTER]: nf_conntrack: fix incorrect classification of IPv6 fragments as ESTABLISHED

The individual fragments of a packet reassembled by conntrack have the
conntrack reference from the reassembled packet attached, but nfctinfo
is not copied. This leaves it initialized to 0, which unfortunately is
the value of IP_CT_ESTABLISHED.

The result is that all IPv6 fragments are tracked as ESTABLISHED,
allowing them to bypass a usual ruleset which accepts ESTABLISHED
packets early.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c

index a20615ffccffe8dae47cb88a635a5603c86c1588..6155b80ff2d20ce9400398e58308511f10382cfe 100644 (file)
@@ -257,6 +257,7 @@ static unsigned int ipv6_conntrack_in(unsigned int hooknum,
                }
                nf_conntrack_get(reasm->nfct);
                (*pskb)->nfct = reasm->nfct;
+               (*pskb)->nfctinfo = reasm->nfctinfo;
                return NF_ACCEPT;
        }