* [PATCH]Fix adding SA through netlink(xfrm_user)
@ 2004-07-28 15:10 Masahide Nakamura
2004-07-28 15:41 ` James Morris
0 siblings, 1 reply; 3+ messages in thread
From: Masahide Nakamura @ 2004-07-28 15:10 UTC (permalink / raw)
To: davem, netdev
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]Fix adding SA through netlink(xfrm_user)
2004-07-28 15:10 [PATCH]Fix adding SA through netlink(xfrm_user) Masahide Nakamura
@ 2004-07-28 15:41 ` James Morris
2004-07-29 2:07 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: James Morris @ 2004-07-28 15:41 UTC (permalink / raw)
To: Masahide Nakamura; +Cc: David S. Miller, netdev, Herbert Xu
On Thu, 29 Jul 2004, Masahide Nakamura wrote:
> 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.
Looks ok, but odd that this has not been picked up before.
>
> 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;
>
>
>
>
--
James Morris
<jmorris@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH]Fix adding SA through netlink(xfrm_user)
2004-07-28 15:41 ` James Morris
@ 2004-07-29 2:07 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2004-07-29 2:07 UTC (permalink / raw)
To: James Morris; +Cc: nakam, netdev, herbert
On Wed, 28 Jul 2004 11:41:33 -0400 (EDT)
James Morris <jmorris@redhat.com> wrote:
> On Thu, 29 Jul 2004, Masahide Nakamura wrote:
>
> > 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.
>
> Looks ok, but odd that this has not been picked up before.
As discovered, this never got picked up before mostly
because the most popular user of xfrm_user (Openswan)
is still using PF_KEY to probe the algorithms.
Patch applied, arigato Masahide-san.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-29 2:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 15:10 [PATCH]Fix adding SA through netlink(xfrm_user) Masahide Nakamura
2004-07-28 15:41 ` James Morris
2004-07-29 2:07 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).