aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorJamal Hadi Salim <hadi@cyberus.ca>2005-06-19 01:45:56 -0400
committerDavid S. Miller <davem@davemloft.net>2005-06-19 01:45:56 -0400
commitee57eef99b9e19194677f552ebc0690ec35d62db (patch)
treef7a6568dc56d60bba6d68d427bd019f491dc81d1 /net/xfrm
parent7d6dfe1f5bc4c56e0c31173014a099ec3fa35907 (diff)
[IPSEC] Use NLMSG_LENGTH in xfrm_exp_state_notify
Small fixup to use netlink macros instead of hardcoding. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 9d30f732a273..ffe1b217347c 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -1123,9 +1123,9 @@ nlmsg_failure:
1123static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c) 1123static int xfrm_exp_state_notify(struct xfrm_state *x, struct km_event *c)
1124{ 1124{
1125 struct sk_buff *skb; 1125 struct sk_buff *skb;
1126 int len = NLMSG_LENGTH(sizeof(struct xfrm_user_expire));
1126 1127
1127 /* fix to do alloc using NLM macros */ 1128 skb = alloc_skb(len, GFP_ATOMIC);
1128 skb = alloc_skb(sizeof(struct xfrm_user_expire) + 16, GFP_ATOMIC);
1129 if (skb == NULL) 1129 if (skb == NULL)
1130 return -ENOMEM; 1130 return -ENOMEM;
1131 1131