Skip to content

Commit

Permalink
[NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick McHardy authored and Herbert Xu committed Nov 30, 2007
1 parent 3ccd862 commit 9dc0564
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions net/netfilter/xt_TCPMSS.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ xt_tcpmss_target6(struct sk_buff *skb,

nexthdr = ipv6h->nexthdr;
tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr);
if (tcphoff < 0) {
WARN_ON(1);
if (tcphoff < 0)
return NF_DROP;
}
ret = tcpmss_mangle_packet(skb, targinfo, tcphoff,
sizeof(*ipv6h) + sizeof(struct tcphdr));
if (ret < 0)
Expand Down

0 comments on commit 9dc0564

Please sign in to comment.