mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
[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>
This commit is contained in:
parent
fb47ddb2db
commit
334f3d45d3
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue