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
e2103b18
Unverified
Commit
e2103b18
authored
Oct 08, 2018
by
Stéphane Graber
Committed by
GitHub
Oct 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2681 from brauner/2018-10-08/adapt_netns_ifaddrs_to_new_kernel
netns_ifaddrs: support NETLINK_DUMP_STRICT_CHK
parents
373376b2
c6b64720
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
netns_ifaddrs.c
src/include/netns_ifaddrs.c
+8
-0
macro.h
src/lxc/macro.h
+8
-0
No files found.
src/include/netns_ifaddrs.c
View file @
e2103b18
...
...
@@ -477,6 +477,14 @@ static int __rtnl_enumerate(int link_af, int addr_af, __s32 netns_id,
if
(
fd
<
0
)
return
-
1
;
r
=
setsockopt
(
fd
,
SOL_NETLINK
,
NETLINK_DUMP_STRICT_CHK
,
&
(
int
){
1
},
sizeof
(
int
));
if
(
r
<
0
&&
netns_id
>=
0
)
{
close
(
fd
);
*
netnsid_aware
=
false
;
return
-
1
;
}
r
=
__ifaddrs_netlink_recv
(
fd
,
1
,
RTM_GETLINK
,
link_af
,
netns_id
,
&
getlink_netnsid_aware
,
cb
,
ctx
);
if
(
!
r
)
...
...
src/lxc/macro.h
View file @
e2103b18
...
...
@@ -239,6 +239,14 @@ extern int __build_bug_on_failed;
#define prctl_arg(x) ((unsigned long)x)
/* networking */
#ifndef NETLINK_DUMP_STRICT_CHK
#define NETLINK_DUMP_STRICT_CHK 12
#endif
#ifndef SOL_NETLINK
#define SOL_NETLINK 270
#endif
#ifndef IFLA_LINKMODE
#define IFLA_LINKMODE 17
#endif
...
...
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