[Openswan dev] Re: [PATCH] netlink: Do not set optional for outbound SAs

Herbert Xu herbert at gondor.apana.org.au
Sun Apr 10 19:58:28 CEST 2005


Hi Ken:

On Sat, Mar 19, 2005 at 09:58:33AM +1100, herbert wrote:
> 
> This patch fixes a bug in kernel_netlink.c.  It's currently setting
> the optional flag for all IPComp SAs.  This is incorrect as it's
> only needed for inbound (in/fwd) SAs.  For outbound SAs the flag means
> something completely different.

Thans for integrating the patch Ken.  Unfortunately it seems that
an extra assignment to optional managed to crept into the CVS which
renders the patch useless.

Here is a patch to fix that up.

There also seems something that's expanding the tabs in my patch.
Could you please have a look at it after applying this one?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-------------- next part --------------
Index: programs/pluto/kernel_netlink.c
===================================================================
RCS file: /public/cvs/openswan-2/programs/pluto/kernel_netlink.c,v
retrieving revision 1.22
diff -u -r1.22 kernel_netlink.c
--- programs/pluto/kernel_netlink.c	6 Apr 2005 19:27:57 -0000	1.22
+++ programs/pluto/kernel_netlink.c	10 Apr 2005 08:57:00 -0000
@@ -501,10 +501,8 @@
 	{
 	    tmpl[i].reqid = proto_info[i].reqid;
 	    tmpl[i].id.proto = proto_info[i].proto;
-            tmpl[i].optional =
-                proto_info[i].proto == IPPROTO_COMP && dir != XFRM_POLICY_OUT;
-
-	    tmpl[i].optional = proto_info[i].proto == IPPROTO_COMP;
+	    tmpl[i].optional =
+		proto_info[i].proto == IPPROTO_COMP && dir != XFRM_POLICY_OUT;
 	    tmpl[i].aalgos = tmpl[i].ealgos = tmpl[i].calgos = ~0;
 	    tmpl[i].mode =
 		proto_info[i].encapsulation == ENCAPSULATION_MODE_TUNNEL;


More information about the Dev mailing list