Commit ee57eef9 authored by Jamal Hadi Salim's avatar Jamal Hadi Salim Committed by David S. Miller
Browse files

[IPSEC] Use NLMSG_LENGTH in xfrm_exp_state_notify



Small fixup to use netlink macros instead of hardcoding.
Signed-off-by: default avatarJamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7d6dfe1f
......@@ -1123,9 +1123,9 @@ nlmsg_failure:
static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c)
{
struct sk_buff *skb;
int len = NLMSG_LENGTH(sizeof(struct xfrm_user_expire));
/* fix to do alloc using NLM macros */
skb = alloc_skb(sizeof(struct xfrm_user_expire) + 16, GFP_ATOMIC);
skb = alloc_skb(len, GFP_ATOMIC);
if (skb == NULL)
return -ENOMEM;
......
Supports Markdown
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