Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
1caf9958
Commit
1caf9958
authored
Feb 24, 2004
by
Michal Ludvig
Committed by
Patrick McHardy
Feb 24, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFRM_USER]: In xfrm_send_{acquire,policy_notify}(), use {RTA,NLMSG}_SPACE().
parent
90af6e35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
net/xfrm/xfrm_user.c
net/xfrm/xfrm_user.c
+4
-6
No files found.
net/xfrm/xfrm_user.c
View file @
1caf9958
...
@@ -1052,9 +1052,8 @@ static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
...
@@ -1052,9 +1052,8 @@ static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt,
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
size_t
len
;
size_t
len
;
len
=
RTA_LENGTH
(
sizeof
(
struct
xfrm_user_tmpl
)
*
xp
->
xfrm_nr
);
len
=
RTA_SPACE
(
sizeof
(
struct
xfrm_user_tmpl
)
*
xp
->
xfrm_nr
);
len
=
RTA_ALIGN
(
len
);
len
+=
NLMSG_SPACE
(
sizeof
(
struct
xfrm_user_acquire
));
len
+=
NLMSG_ALIGN
(
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_user_acquire
)));
skb
=
alloc_skb
(
len
,
GFP_ATOMIC
);
skb
=
alloc_skb
(
len
,
GFP_ATOMIC
);
if
(
skb
==
NULL
)
if
(
skb
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -1151,9 +1150,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, int hard)
...
@@ -1151,9 +1150,8 @@ static int xfrm_send_policy_notify(struct xfrm_policy *xp, int dir, int hard)
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
size_t
len
;
size_t
len
;
len
=
sizeof
(
struct
xfrm_user_tmpl
)
*
xp
->
xfrm_nr
;
len
=
RTA_SPACE
(
sizeof
(
struct
xfrm_user_tmpl
)
*
xp
->
xfrm_nr
);
len
=
RTA_ALIGN
(
RTA_LENGTH
(
len
));
len
+=
NLMSG_SPACE
(
sizeof
(
struct
xfrm_user_polexpire
));
len
+=
NLMSG_ALIGN
(
NLMSG_LENGTH
(
sizeof
(
struct
xfrm_user_polexpire
)));
skb
=
alloc_skb
(
len
,
GFP_ATOMIC
);
skb
=
alloc_skb
(
len
,
GFP_ATOMIC
);
if
(
skb
==
NULL
)
if
(
skb
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment