/[linux-patches]/genpatches-2.6/trunk/2.6.14/1032_3_pptp-endianness.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1032_3_pptp-endianness.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 214 - (show annotations) (download) (as text)
Fri Nov 25 00:35:16 2005 UTC (15 years ago) by dsd
File MIME type: text/x-diff
File size: 1345 byte(s)
Linux 2.6.14.3
1 From stable-bounces@linux.kernel.org Tue Nov 15 04:32:56 2005
2 Date: Tue, 15 Nov 2005 13:32:36 +0100
3 Message-ID: <20051115133236.610397000@hanuman.de.gnumonks.org>
4 From: Harald Welte <laforge@netfilter.org>
5 To: Stable Kernel <stable@kernel.org>
6 Cc:
7 Subject: [PATCH] [NETFILTER] PPTP helper: Fix endianness bug in GRE key / CallID NAT
8
9 This endianness bug slipped through while changing the 'gre.key' field in
10 the conntrack tuple from 32bit to 16bit.
11
12 None of my tests caught the problem, since the linux pptp client always has
13 '0' as call id / gre key. Only windows clients actually trigger the bug.
14
15 Signed-off-by: Harald Welte <laforge@netfilter.org>
16 Signed-off-by: Chris Wright <chrisw@osdl.org>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
18 ---
19 net/ipv4/netfilter/ip_nat_proto_gre.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22 --- linux-2.6.14.2.orig/net/ipv4/netfilter/ip_nat_proto_gre.c
23 +++ linux-2.6.14.2/net/ipv4/netfilter/ip_nat_proto_gre.c
24 @@ -139,8 +139,8 @@ gre_manip_pkt(struct sk_buff **pskb,
25 break;
26 case GRE_VERSION_PPTP:
27 DEBUGP("call_id -> 0x%04x\n",
28 - ntohl(tuple->dst.u.gre.key));
29 - pgreh->call_id = htons(ntohl(tuple->dst.u.gre.key));
30 + ntohs(tuple->dst.u.gre.key));
31 + pgreh->call_id = tuple->dst.u.gre.key;
32 break;
33 default:
34 DEBUGP("can't nat unknown GRE version\n");

  ViewVC Help
Powered by ViewVC 1.1.20