diff options
| author | Jamal Hadi Salim <[email protected]> | 2005-06-19 05:45:56 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2005-06-19 05:45:56 +0000 |
| commit | ee57eef99b9e19194677f552ebc0690ec35d62db (patch) | |
| tree | f7a6568dc56d60bba6d68d427bd019f491dc81d1 /net/xfrm/xfrm_user.c | |
| parent | [IPSEC] Fix xfrm_state leaks in error path (diff) | |
| download | kernel-ee57eef99b9e19194677f552ebc0690ec35d62db.tar.gz kernel-ee57eef99b9e19194677f552ebc0690ec35d62db.zip | |
[IPSEC] Use NLMSG_LENGTH in xfrm_exp_state_notify
Small fixup to use netlink macros instead of hardcoding.
Signed-off-by: Jamal Hadi Salim <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/xfrm/xfrm_user.c')
| -rw-r--r-- | net/xfrm/xfrm_user.c | 4 |
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: 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; |
