diff options
author | Patrick McHardy <kaber@trash.net> | 2007-12-13 12:42:34 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-14 10:32:00 -0800 |
commit | b240f50b6837e4b348d106840f689e64565a7597 (patch) | |
tree | f1563db9c0647d1257d5a9f4199268c21a53c3c2 | |
parent | e01dcced45f895797dfba326bdb10d8d85e13eee (diff) | |
download | lwn-b240f50b6837e4b348d106840f689e64565a7597.tar.gz lwn-b240f50b6837e4b348d106840f689e64565a7597.zip |
NETFILTER: xt_TCPMSS: remove network triggerable WARN_ON
[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>
-rw-r--r-- | net/netfilter/xt_TCPMSS.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/xt_TCPMSS.c b/net/netfilter/xt_TCPMSS.c index 15fe8f649510..fe7b3d8054ee 100644 --- a/net/netfilter/xt_TCPMSS.c +++ b/net/netfilter/xt_TCPMSS.c @@ -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) |