On Tue, Jun 24, 2003 at 08:09:33AM +1000, herbert wrote: > > You're absolutely right. I'll fix up the af_key patch. Unfortunately I failed to fix the pfkey patch because RFC2367 requires this broken behaviour: 2.3.3 Address Extension The Address extension specifies one or more addresses that are associated with a security association. Address extensions for both ... zeroing of ports (e.g. sin_port and sin6_port) MUST be done for all messages except for originating SADB_ACQUIRE messages, which SHOULD fill them in with ports from the relevant TCP or UDP session which generates the ACQUIRE message. If the ports are non-zero, then the Anyway, I'll leave this to people who actually use pfkey. I'm glad that I've finally moved my freeswan patch over to netlink for acquire messages as well :) It only needs pfkey for algorithm enumeration now. So can you please apply the netlink part of the ports patch attached below? Thanks, -- Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: kernel-source-2.5/include/linux/xfrm.h =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/include/linux/xfrm.h,v retrieving revision 1.1.1.6 diff -u -r1.1.1.6 xfrm.h --- kernel-source-2.5/include/linux/xfrm.h 17 Jun 2003 04:19:42 -0000 1.1.1.6 +++ kernel-source-2.5/include/linux/xfrm.h 24 Jun 2003 08:55:39 -0000 @@ -201,6 +203,7 @@ struct xfrm_user_acquire { struct xfrm_id id; xfrm_address_t saddr; + struct xfrm_selector sel; struct xfrm_userpolicy_info policy; __u32 aalgos; __u32 ealgos; Index: kernel-source-2.5/net/xfrm/xfrm_user.c =================================================================== RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/net/xfrm/xfrm_user.c,v retrieving revision 1.5 diff -u -r1.5 xfrm_user.c --- kernel-source-2.5/net/xfrm/xfrm_user.c 20 Jun 2003 11:49:08 -0000 1.5 +++ kernel-source-2.5/net/xfrm/xfrm_user.c 23 Jun 2003 12:28:54 -0000 @@ -1012,6 +1011,7 @@ memcpy(&ua->id, &x->id, sizeof(ua->id)); memcpy(&ua->saddr, &x->props.saddr, sizeof(ua->saddr)); + memcpy(&ua->sel, &x->sel, sizeof(ua->sel)); copy_to_user_policy(xp, &ua->policy, dir); ua->aalgos = xt->aalgos; ua->ealgos = xt->ealgos;