Commit 5de72403 authored by Patrick McHardy's avatar Patrick McHardy Committed by Greg Kroah-Hartman

NETFILTER: xt_TCPMSS: remove network triggerable WARN_ON

[NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON

[ Upstream commit: 9dc0564e ]

ipv6_skip_exthdr() returns -1 for invalid packets. don't WARN_ON
that.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9aa67118
...@@ -178,10 +178,8 @@ xt_tcpmss_target6(struct sk_buff **pskb, ...@@ -178,10 +178,8 @@ xt_tcpmss_target6(struct sk_buff **pskb,
nexthdr = ipv6h->nexthdr; nexthdr = ipv6h->nexthdr;
tcphoff = ipv6_skip_exthdr(*pskb, sizeof(*ipv6h), &nexthdr); tcphoff = ipv6_skip_exthdr(*pskb, sizeof(*ipv6h), &nexthdr);
if (tcphoff < 0) { if (tcphoff < 0)
WARN_ON(1);
return NF_DROP; return NF_DROP;
}
ret = tcpmss_mangle_packet(pskb, targinfo, tcphoff, ret = tcpmss_mangle_packet(pskb, targinfo, tcphoff,
sizeof(*ipv6h) + sizeof(struct tcphdr)); sizeof(*ipv6h) + sizeof(struct tcphdr));
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment