Skip to content

Commit

Permalink
[XFRM]: Sub-policies broke policy events
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Masahide NAKAMURA <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Jamal Hadi Salim authored and David S. Miller committed Nov 22, 2006
1 parent fb47ddb commit 334f3d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/xfrm/xfrm_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 334f3d4

Please sign in to comment.