[Openswan dev] openswan-2.6.34rc4 broken for on-demand tunneling
David McCullough
david_mccullough at mcafee.com
Mon Jun 6 07:52:49 EDT 2011
Jivin Tuomo Soini lays it down ...
> Tuomo Soini wrote:
> > Just noticed 2.6.34rc4 breaks on-demand tunneling which worked with 2.6.33.
> >
> Broken commit causing the issue is
>
> b20993af4618e7c10cdb9dab5e4900e06bdf32ad
>
> this causes following error:
>
> Jun 6 14:24:43 evelb pluto[4918]: XFRM_MSG_ACQUIRE message from kernel
> malformed: unknown address family
>
> And on-demand tunneling won't ever happen.
Try this patch and see if it helps :-)
Cheers,
Davidm
diff --git a/programs/pluto/kernel_netlink.c b/programs/pluto/kernel_netlink.c
index 1e01dcc..cd4ba72 100644
--- a/programs/pluto/kernel_netlink.c
+++ b/programs/pluto/kernel_netlink.c
@@ -1142,7 +1142,7 @@ netlink_acquire(struct nlmsghdr *n)
/* to get rid of complaints about strict alignment: */
/* structure copy it first */
- memcpy(NLMSG_DATA(n), &ac1, sizeof(struct xfrm_user_acquire));
+ memcpy(&ac1, NLMSG_DATA(n), sizeof(struct xfrm_user_acquire));
acquire = &ac1; /* then use it. */
srcx = &acquire->sel.saddr;
@@ -1224,7 +1224,7 @@ netlink_policy_expire(struct nlmsghdr *n)
return;
}
- memcpy(NLMSG_DATA(n), &up1, sizeof(up1));
+ memcpy(&up1, NLMSG_DATA(n), sizeof(up1));
upe = &up1;
req.id.dir = upe->pol.dir;
req.id.index = upe->pol.index;
--
David McCullough, david_mccullough at mcafee.com, Ph:+61 734352815
McAfee - SnapGear http://www.mcafee.com http://www.uCdot.org
More information about the Dev
mailing list