projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d6dfe1
)
[IPSEC] Use NLMSG_LENGTH in xfrm_exp_state_notify
author
Jamal Hadi Salim
<
[email protected]
>
Sun, 19 Jun 2005 05:45:56 +0000
(22:45 -0700)
committer
David S. Miller
<
[email protected]
>
Sun, 19 Jun 2005 05:45:56 +0000
(22:45 -0700)
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]
>
net/xfrm/xfrm_user.c
patch
|
blob
|
history
diff --git
a/net/xfrm/xfrm_user.c
b/net/xfrm/xfrm_user.c
index 9d30f732a27377187d3f6b1c3d8deabafed2f843..ffe1b217347cbd85361b506c3ecc2120441b0fbb 100644
(file)
--- 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;