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
92a8d6e0
Unverified
Commit
92a8d6e0
authored
May 19, 2020
by
Christian Brauner
Committed by
Stéphane Graber
May 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: use __instantiate_ns_common() in instantiate_ns_phys() too
Fixes:
https://lists.linuxcontainers.org/pipermail/lxc-users/2020-May/015245.html
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
d7df0956
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
network.c
src/lxc/network.c
+6
-12
No files found.
src/lxc/network.c
View file @
92a8d6e0
...
...
@@ -860,7 +860,7 @@ static instantiate_cb netdev_conf[LXC_NET_MAXCONFTYPE + 1] = {
[
LXC_NET_NONE
]
=
instantiate_none
,
};
static
int
__instantiate_common
(
struct
lxc_netdev
*
netdev
)
static
int
__instantiate_
ns_
common
(
struct
lxc_netdev
*
netdev
)
{
char
current_ifname
[
IFNAMSIZ
];
...
...
@@ -905,33 +905,27 @@ static int __instantiate_common(struct lxc_netdev *netdev)
static
int
instantiate_ns_veth
(
struct
lxc_netdev
*
netdev
)
{
return
__instantiate_common
(
netdev
);
return
__instantiate_
ns_
common
(
netdev
);
}
static
int
instantiate_ns_macvlan
(
struct
lxc_netdev
*
netdev
)
{
return
__instantiate_common
(
netdev
);
return
__instantiate_
ns_
common
(
netdev
);
}
static
int
instantiate_ns_ipvlan
(
struct
lxc_netdev
*
netdev
)
{
return
__instantiate_common
(
netdev
);
return
__instantiate_
ns_
common
(
netdev
);
}
static
int
instantiate_ns_vlan
(
struct
lxc_netdev
*
netdev
)
{
return
__instantiate_common
(
netdev
);
return
__instantiate_
ns_
common
(
netdev
);
}
static
int
instantiate_ns_phys
(
struct
lxc_netdev
*
netdev
)
{
netdev
->
ifindex
=
if_nametoindex
(
netdev
->
name
);
if
(
!
netdev
->
ifindex
)
return
log_error_errno
(
-
1
,
errno
,
"Failed to retrieve ifindex for network device with name %s"
,
netdev
->
name
);
return
0
;
return
__instantiate_ns_common
(
netdev
);
}
static
int
instantiate_ns_empty
(
struct
lxc_netdev
*
netdev
)
...
...
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