From: "Rodrigo Partearroyo González" <rpartearroyo@albentia.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: "Iratxo Pichel Ortiz" <ipichel@albentia.com>,
"Noelia Morón" <nmoron@albentia.com>
Subject: net/sched/act_nat.c BUG
Date: Fri, 9 Jul 2010 16:37:56 +0200 [thread overview]
Message-ID: <201007091637.57660.rpartearroyo@albentia.com> (raw)
Hi all,
I have been testing Stateless NAT and found that ICMP packets with length less
than 20 bytes were not correctly NAT'ed. I have found a BUG that makes taking
into account IP header length twice, so ICMP packets smaller than 20 bytes
were being dropped.
The proposed fix is:
Index: net/sched/act_nat.c
===================================================================
--- net/sched/act_nat.c
+++ net/sched/act_nat.c
@@ -202,7 +202,7 @@
{
struct icmphdr *icmph;
- if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
+ if (!pskb_may_pull(skb, ihl + sizeof(*icmph)))
goto drop;
icmph = (void *)(skb_network_header(skb) + ihl);
Please, consider applying it.
--
Rodrigo Partearroyo González
R&D Engineer
Albentia Systems S.A.
http://www.albentia.com
+34 914400213
C\Margarita Salas 22
Parque Tecnológico de Leganés
Leganés (28918)
Madrid
Spain
next reply other threads:[~2010-07-09 14:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 14:37 Rodrigo Partearroyo González [this message]
2010-07-09 15:13 ` Eric Dumazet
2010-07-09 23:23 ` Herbert Xu
2010-07-10 0:00 ` David Miller
2010-07-10 6:27 ` Eric Dumazet
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=201007091637.57660.rpartearroyo@albentia.com \
--to=rpartearroyo@albentia.com \
--cc=herbert@gondor.hengli.com.au \
--cc=ipichel@albentia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nmoron@albentia.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®