]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NETFILTER: xt_TCPMSS: remove network triggerable WARN_ON
authorPatrick McHardy <kaber@trash.net>
Thu, 13 Dec 2007 04:42:34 +0000 (12:42 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 14 Dec 2007 18:32:00 +0000 (10:32 -0800)
[NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON

[ Upstream commit: 9dc0564e862b1b9a4677dec2c736b12169e03e99 ]

ipv6_skip_exthdr() returns -1 for invalid packets. don't WARN_ON
that.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/xt_TCPMSS.c

index 15fe8f649510398f6df0e7c2e665fd28b0b0fd47..fe7b3d8054ee352137e37613c7617387f7fa9549 100644 (file)
@@ -178,10 +178,8 @@ xt_tcpmss_target6(struct sk_buff **pskb,
 
        nexthdr = ipv6h->nexthdr;
        tcphoff = ipv6_skip_exthdr(*pskb, sizeof(*ipv6h), &nexthdr);
-       if (tcphoff < 0) {
-               WARN_ON(1);
+       if (tcphoff < 0)
                return NF_DROP;
-       }
        ret = tcpmss_mangle_packet(pskb, targinfo, tcphoff,
                                   sizeof(*ipv6h) + sizeof(struct tcphdr));
        if (ret < 0)