Commit 90af6e35 authored by Michal Ludvig's avatar Michal Ludvig Committed by Patrick McHardy

[XFRM_USER]: Fix SKB sizing in xfrm_send_policy_notify().

parent e1ef7eb2
...@@ -1153,7 +1153,7 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, int hard) ...@@ -1153,7 +1153,7 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, int hard)
len = sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr; len = sizeof(struct xfrm_user_tmpl) * xp->xfrm_nr;
len = RTA_ALIGN(RTA_LENGTH(len)); len = RTA_ALIGN(RTA_LENGTH(len));
len += NLMSG_ALIGN(NLMSG_LENGTH(sizeof(struct xfrm_userpolicy_info))); len += NLMSG_ALIGN(NLMSG_LENGTH(sizeof(struct xfrm_user_polexpire)));
skb = alloc_skb(len, GFP_ATOMIC); skb = alloc_skb(len, GFP_ATOMIC);
if (skb == NULL) if (skb == NULL)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment