[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[nakam@linux-ipv6.org: [PATCH]Fix adding SA through netlink(xfrm_user)]



This is applicable to the backport of xfrm that is
in kernel-source-2.4.26. I am puting it in svn.

I am going to check through 2.6 bitkeeper for other applicable changes
to xfrm.

-- 
Horms

----- Forwarded message from Masahide Nakamura <nakam@linux-ipv6.org> -----

Date: Thu, 29 Jul 2004 00:10:58 +0900
From: Masahide Nakamura <nakam@linux-ipv6.org>
To: davem@redhat.com, netdev@oss.sgi.com
Subject: [PATCH]Fix adding SA through netlink(xfrm_user)
X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=no 
	version=2.63-tabatha_2004072100

Hello,

When adding IPsec SA with PF_KEY (pfkey_add()),
xfrm_probe_algs() is called to make all algorithms valid.
However, it is missing to call it with netlink (xfrm_user) case and
it causes xfrm_aalg_get_byname() return NULL even if the name of
algorithm seems to be correct.

The patch fixes it and is against 2.6.7. Please apply it.

Index: linux26/net/xfrm/xfrm_user.c
===================================================================
RCS file: /cvsroot/usagi/usagi/kernel/linux26/net/xfrm/xfrm_user.c,v
retrieving revision 1.1.1.13
diff -u -r1.1.1.13 xfrm_user.c
--- linux26/net/xfrm/xfrm_user.c	3 Apr 2004 05:52:43 -0000	1.1.1.13
+++ linux26/net/xfrm/xfrm_user.c	28 Jul 2004 14:26:21 -0000
@@ -258,6 +258,8 @@
 	if (err)
 		return err;
 
+	xfrm_probe_algs();
+
 	x = xfrm_state_construct(p, (struct rtattr **) xfrma, &err);
 	if (!x)
 		return err;



-- 
Masahide NAKAMURA

----- End forwarded message -----



Reply to: