[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201007091637.57660.rpartearroyo@albentia.com>
Date: Fri, 9 Jul 2010 16:37:56 +0200
From: Rodrigo Partearroyo González
<rpartearroyo@...entia.com>
To: Herbert Xu <herbert@...dor.apana.org.au>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: Iratxo Pichel Ortiz <ipichel@...entia.com>,
Noelia Morón <nmoron@...entia.com>
Subject: net/sched/act_nat.c BUG
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists