diff options
author | Jamal Hadi Salim <hadi@cyberus.ca> | 2006-11-19 22:53:07 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-11-22 00:16:34 (GMT) |
commit | 334f3d45d3e0c925eb15003560cdd6f5383c88d0 (patch) | |
tree | f2e63fc32b3861693541a524fa8fb4e5bf86bea9 /net/xfrm | |
parent | fb47ddb2db9c18664bd7b06c201a2398885b64fc (diff) | |
download | linux-334f3d45d3e0c925eb15003560cdd6f5383c88d0.tar.xz |
[XFRM]: Sub-policies broke policy events
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>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_user.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index b43e764..2dae1c1 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -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); |