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
2eb5fde3
Commit
2eb5fde3
authored
Jul 17, 2017
by
Stéphane Graber
Committed by
GitHub
Jul 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1707 from brauner/2017-07-17/additional_stable_cherry_picks
stable-2.0: bugfixes
parents
fabc1414
4eb33ee5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
confile.c
src/lxc/confile.c
+25
-0
No files found.
src/lxc/confile.c
View file @
2eb5fde3
...
@@ -871,6 +871,11 @@ static int set_config_network_flags(const char *key, const char *value,
...
@@ -871,6 +871,11 @@ static int set_config_network_flags(const char *key, const char *value,
if
(
!
netdev
)
if
(
!
netdev
)
return
-
1
;
return
-
1
;
if
(
lxc_config_value_empty
(
value
))
{
netdev
->
flags
=
0
;
return
0
;
}
netdev
->
flags
|=
IFF_UP
;
netdev
->
flags
|=
IFF_UP
;
return
0
;
return
0
;
...
@@ -932,6 +937,11 @@ static int set_config_network_macvlan_mode(const char *key, const char *value,
...
@@ -932,6 +937,11 @@ static int set_config_network_macvlan_mode(const char *key, const char *value,
return
-
1
;
return
-
1
;
}
}
if
(
lxc_config_value_empty
(
value
))
{
netdev
->
priv
.
macvlan_attr
.
mode
=
0
;
return
0
;
}
return
macvlan_mode
(
&
netdev
->
priv
.
macvlan_attr
.
mode
,
value
);
return
macvlan_mode
(
&
netdev
->
priv
.
macvlan_attr
.
mode
,
value
);
}
}
...
@@ -978,6 +988,11 @@ static int set_config_network_vlan_id(const char *key, const char *value,
...
@@ -978,6 +988,11 @@ static int set_config_network_vlan_id(const char *key, const char *value,
return
-
1
;
return
-
1
;
}
}
if
(
lxc_config_value_empty
(
value
))
{
netdev
->
priv
.
vlan_attr
.
vid
=
0
;
return
0
;
}
if
(
get_u16
(
&
netdev
->
priv
.
vlan_attr
.
vid
,
value
,
0
))
if
(
get_u16
(
&
netdev
->
priv
.
vlan_attr
.
vid
,
value
,
0
))
return
-
1
;
return
-
1
;
...
@@ -1100,6 +1115,11 @@ static int set_config_network_ipv4_gateway(const char *key, const char *value,
...
@@ -1100,6 +1115,11 @@ static int set_config_network_ipv4_gateway(const char *key, const char *value,
free
(
netdev
->
ipv4_gateway
);
free
(
netdev
->
ipv4_gateway
);
if
(
lxc_config_value_empty
(
value
))
{
netdev
->
ipv4_gateway
=
NULL
;
return
0
;
}
if
(
!
strcmp
(
value
,
"auto"
))
{
if
(
!
strcmp
(
value
,
"auto"
))
{
netdev
->
ipv4_gateway
=
NULL
;
netdev
->
ipv4_gateway
=
NULL
;
netdev
->
ipv4_gateway_auto
=
true
;
netdev
->
ipv4_gateway_auto
=
true
;
...
@@ -1200,6 +1220,11 @@ static int set_config_network_ipv6_gateway(const char *key, const char *value,
...
@@ -1200,6 +1220,11 @@ static int set_config_network_ipv6_gateway(const char *key, const char *value,
free
(
netdev
->
ipv6_gateway
);
free
(
netdev
->
ipv6_gateway
);
if
(
lxc_config_value_empty
(
value
))
{
netdev
->
ipv6_gateway
=
NULL
;
return
0
;
}
if
(
!
strcmp
(
value
,
"auto"
))
{
if
(
!
strcmp
(
value
,
"auto"
))
{
netdev
->
ipv6_gateway
=
NULL
;
netdev
->
ipv6_gateway
=
NULL
;
netdev
->
ipv6_gateway_auto
=
true
;
netdev
->
ipv6_gateway_auto
=
true
;
...
...
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