All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: herbert@gondor.apana.org.au
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: [NETFILTER 01/03]: xt_TCPMSS: remove network triggerable WARN_ON
Date: Fri, 30 Nov 2007 00:57:13 +0100 (MET)	[thread overview]
Message-ID: <20071129235705.10108.90889.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20071129235703.10108.7960.sendpatchset@localhost.localdomain>

[NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON

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

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 6d3d8a9e26a4322f7f6f2601742f7a669585f338
tree 742b7f78ffcb24a6400a95db1dca419228b3e23e
parent 09f345da758fca1222b0971b65b2fddbdf78bb83
author Patrick McHardy <kaber@trash.net> Thu, 29 Nov 2007 09:04:39 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 29 Nov 2007 09:04:39 +0100

 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 07435a6..8e76d1f 100644
--- a/net/netfilter/xt_TCPMSS.c
+++ b/net/netfilter/xt_TCPMSS.c
@@ -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)

  reply	other threads:[~2007-11-29 23:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29 23:57 [NETFILTER 00/03]: Netfilter fixes Patrick McHardy
2007-11-29 23:57 ` Patrick McHardy [this message]
2007-11-29 23:57 ` [NETFILTER 02/03]: fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK Patrick McHardy
2007-11-29 23:57 ` [TEXTSEARCH 03/03]: Do not allow zero length patterns in the textsearch infrastructure Patrick McHardy
2007-11-30 13:04 ` [NETFILTER 00/03]: Netfilter fixes Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071129235705.10108.90889.sendpatchset@localhost.localdomain \
    --to=kaber@trash.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.