Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
b5887164
Commit
b5887164
authored
Nov 27, 2014
by
Shuai Zhang
Committed by
Stéphane Graber
Nov 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix wrong nlmsg_len
nlmsg_len is the length of message including header. Signed-off-by:
Shuai Zhang
<
zs.broccoli@gmail.com
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
a6ee1277
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nl.c
src/lxc/nl.c
+2
-2
No files found.
src/lxc/nl.c
View file @
b5887164
...
...
@@ -107,14 +107,14 @@ void nla_end_nested(struct nlmsg *nlmsg, struct rtattr *attr)
extern
struct
nlmsg
*
nlmsg_alloc
(
size_t
size
)
{
struct
nlmsg
*
nlmsg
;
size_t
len
=
NLMSG_
ALIGN
(
size
)
+
NLMSG_ALIGN
(
sizeof
(
struct
nlmsghdr
*
)
);
size_t
len
=
NLMSG_
HDRLEN
+
NLMSG_ALIGN
(
size
);
nlmsg
=
(
struct
nlmsg
*
)
malloc
(
len
);
if
(
!
nlmsg
)
return
NULL
;
memset
(
nlmsg
,
0
,
len
);
nlmsg
->
nlmsghdr
.
nlmsg_len
=
NLMSG_
ALIGN
(
size
)
;
nlmsg
->
nlmsghdr
.
nlmsg_len
=
NLMSG_
HDRLEN
;
return
nlmsg
;
}
...
...
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