1 |
Author: mpagano |
2 |
Date: 2008-11-05 02:12:16 +0000 (Wed, 05 Nov 2008) |
3 |
New Revision: 1371 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.27/2001_setkey-policy-breakage-fix.patch |
7 |
Modified: |
8 |
genpatches-2.6/trunk/2.6.27/0000_README |
9 |
Log: |
10 |
Patch to fix setkey policy breakage |
11 |
|
12 |
Modified: genpatches-2.6/trunk/2.6.27/0000_README |
13 |
=================================================================== |
14 |
--- genpatches-2.6/trunk/2.6.27/0000_README 2008-10-30 16:46:39 UTC (rev 1370) |
15 |
+++ genpatches-2.6/trunk/2.6.27/0000_README 2008-11-05 02:12:16 UTC (rev 1371) |
16 |
@@ -59,6 +59,10 @@ |
17 |
From: http://bugs.gentoo.org/show_bug.cgi?id=242634 |
18 |
Desc: Restore ordering of TCP options for the sake of inter-operability |
19 |
|
20 |
+Patch: 2001_setkey-policy-breakage-fix.patch |
21 |
+From: http://bugs.gentoo.org/show_bug.cgi?id=245369 |
22 |
+Desc: Patch to fix setkey policy breakage |
23 |
+ |
24 |
Patch: 4100_dm-bbr.patch |
25 |
From: EVMS 2.5.2 |
26 |
Desc: Bad block relocation support for LiveCD users |
27 |
|
28 |
Added: genpatches-2.6/trunk/2.6.27/2001_setkey-policy-breakage-fix.patch |
29 |
=================================================================== |
30 |
--- genpatches-2.6/trunk/2.6.27/2001_setkey-policy-breakage-fix.patch (rev 0) |
31 |
+++ genpatches-2.6/trunk/2.6.27/2001_setkey-policy-breakage-fix.patch 2008-11-05 02:12:16 UTC (rev 1371) |
32 |
@@ -0,0 +1,45 @@ |
33 |
+From: Alexey Dobriyan <adobriyan@×××××.com> |
34 |
+Date: Fri, 31 Oct 2008 23:41:26 +0000 (-0700) |
35 |
+Subject: key: fix setkey(8) policy set breakage |
36 |
+X-Git-Tag: v2.6.28-rc3~3^2~4 |
37 |
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=920da6923cf03c8a78fbaffa408f8ab37f6abfc1 |
38 |
+ |
39 |
+key: fix setkey(8) policy set breakage |
40 |
+ |
41 |
+Steps to reproduce: |
42 |
+ |
43 |
+ #/usr/sbin/setkey -f |
44 |
+ flush; |
45 |
+ spdflush; |
46 |
+ |
47 |
+ add 192.168.0.42 192.168.0.1 ah 24500 -A hmac-md5 "1234567890123456"; |
48 |
+ add 192.168.0.42 192.168.0.1 esp 24501 -E 3des-cbc "123456789012123456789012"; |
49 |
+ |
50 |
+ spdadd 192.168.0.42 192.168.0.1 any -P out ipsec |
51 |
+ esp/transport//require |
52 |
+ ah/transport//require; |
53 |
+ |
54 |
+setkey: invalid keymsg length |
55 |
+ |
56 |
+Policy dump will bail out with the same message after that. |
57 |
+ |
58 |
+-recv(4, "\2\16\0\0\32\0\3\0\0\0\0\0\37\r\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208 |
59 |
++recv(4, "\2\16\0\0\36\0\3\0\0\0\0\0H\t\0\0\3\0\5\0\377 \0\0\2\0\0\0\300\250\0*\0"..., 32768, 0) = 208 |
60 |
+ |
61 |
+Signed-off-by: Alexey Dobriyan <adobriyan@×××××.com> |
62 |
+Signed-off-by: David S. Miller <davem@×××××××××.net> |
63 |
+--- |
64 |
+ |
65 |
+diff --git a/net/key/af_key.c b/net/key/af_key.c |
66 |
+index e55e044..3440a46 100644 |
67 |
+--- a/net/key/af_key.c |
68 |
++++ b/net/key/af_key.c |
69 |
+@@ -2075,7 +2075,6 @@ static int pfkey_xfrm_policy2msg(struct sk_buff *skb, struct xfrm_policy *xp, in |
70 |
+ req_size += socklen * 2; |
71 |
+ } else { |
72 |
+ size -= 2*socklen; |
73 |
+- socklen = 0; |
74 |
+ } |
75 |
+ rq = (void*)skb_put(skb, req_size); |
76 |
+ pol->sadb_x_policy_len += req_size/8; |
77 |
+ |