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
9c538d8a
Unverified
Commit
9c538d8a
authored
Aug 25, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: do not check union on wrong net type
This will obviously not work. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
f5c0d3f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
conf.c
src/lxc/conf.c
+2
-20
No files found.
src/lxc/conf.c
View file @
9c538d8a
...
@@ -3156,24 +3156,6 @@ int lxc_setup_networks_in_parent_namespaces(struct lxc_handler *handler)
...
@@ -3156,24 +3156,6 @@ int lxc_setup_networks_in_parent_namespaces(struct lxc_handler *handler)
return
-
1
;
return
-
1
;
}
}
if
(
netdev
->
type
!=
LXC_NET_MACVLAN
&&
netdev
->
priv
.
macvlan_attr
.
mode
)
{
ERROR
(
"Invalid macvlan.mode for a non-macvlan netdev"
);
return
-
1
;
}
if
(
netdev
->
type
!=
LXC_NET_VETH
&&
netdev
->
priv
.
veth_attr
.
pair
)
{
ERROR
(
"Invalid veth pair for a non-veth netdev"
);
return
-
1
;
}
if
(
netdev
->
type
!=
LXC_NET_VLAN
&&
netdev
->
priv
.
vlan_attr
.
vid
>
0
)
{
ERROR
(
"Invalid vlan.id for a non-macvlan netdev"
);
return
-
1
;
}
if
(
netdev_conf
[
netdev
->
type
](
handler
,
netdev
))
{
if
(
netdev_conf
[
netdev
->
type
](
handler
,
netdev
))
{
ERROR
(
"failed to create netdev"
);
ERROR
(
"failed to create netdev"
);
return
-
1
;
return
-
1
;
...
@@ -3218,9 +3200,9 @@ bool lxc_delete_network(struct lxc_handler *handler)
...
@@ -3218,9 +3200,9 @@ bool lxc_delete_network(struct lxc_handler *handler)
if
(
ret
<
0
)
if
(
ret
<
0
)
WARN
(
"Failed to deconfigure network device"
);
WARN
(
"Failed to deconfigure network device"
);
/* Recent kernel remove the virtual interfaces when the network
/* Recent kernel
s
remove the virtual interfaces when the network
* namespace is destroyed but in case we did not move the
* namespace is destroyed but in case we did not move the
* interface to the network namespace, we have to destroy it
* interface to the network namespace, we have to destroy it
.
*/
*/
ret
=
lxc_netdev_delete_by_index
(
netdev
->
ifindex
);
ret
=
lxc_netdev_delete_by_index
(
netdev
->
ifindex
);
if
(
-
ret
==
ENODEV
)
{
if
(
-
ret
==
ENODEV
)
{
...
...
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