[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch 07/23] [PATCH] [NETFILTER] PPTP helper: Fix endianness bug in GRE key / CallID NAT
-stable review patch.  If anyone has any objections, please let us know.

This endianness bug slipped through while changing the 'gre.key' field in
the conntrack tuple from 32bit to 16bit.

None of my tests caught the problem, since the linux pptp client always has
'0' as call id / gre key. Only windows clients actually trigger the bug.

Signed-off-by: Harald Welte <>
Signed-off-by: Chris Wright <>
Signed-off-by: Greg Kroah-Hartman <>
net/ipv4/netfilter/ip_nat_proto_gre.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-
+++ linux-
@@ -139,8 +139,8 @@ gre_manip_pkt(struct sk_buff **pskb,
DEBUGP("call_id -> 0x%04x\n",
- ntohl(tuple->dst.u.gre.key));
- pgreh->call_id = htons(ntohl(tuple->dst.u.gre.key));
+ ntohs(tuple->dst.u.gre.key));
+ pgreh->call_id = tuple->dst.u.gre.key;
DEBUGP("can't nat unknown GRE version\n");
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-11-22 22:11    [W:0.041 / U:33.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site