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

[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 @@ static int build_expire(struct sk_buff *skb, struct xfrm_state *x, int hard)
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;
......
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