Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;