]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFRM]: Sub-policies broke policy events
authorJamal Hadi Salim <hadi@cyberus.ca>
Sun, 19 Nov 2006 22:53:07 +0000 (14:53 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 22 Nov 2006 00:16:34 +0000 (16:16 -0800)
XFRM policy events are broken when sub-policy feature is turned on.
A simple test to verify this:
run ip xfrm mon on one window and add then delete a policy on another
window ..

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Acked-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_user.c

index b43e7647e125692955b8a9ce5081ee3bb7166bb8..2dae1c1ea362503c98d67d752af331c11d745e38 100644 (file)
@@ -2060,6 +2060,9 @@ static int xfrm_notify_policy(struct xfrm_policy *xp, int dir, struct km_event *
                len += RTA_SPACE(headlen);
                headlen = sizeof(*id);
        }
+#ifdef CONFIG_XFRM_SUB_POLICY
+       len += RTA_SPACE(sizeof(struct xfrm_userpolicy_type));
+#endif
        len += NLMSG_SPACE(headlen);
 
        skb = alloc_skb(len, GFP_ATOMIC);