confile: clear ipv{4,6} gateway

parent fabc1414
......@@ -1100,6 +1100,11 @@ static int set_config_network_ipv4_gateway(const char *key, const char *value,
free(netdev->ipv4_gateway);
if (lxc_config_value_empty(value)) {
netdev->ipv4_gateway = NULL;
return 0;
}
if (!strcmp(value, "auto")) {
netdev->ipv4_gateway = NULL;
netdev->ipv4_gateway_auto = true;
......@@ -1200,6 +1205,11 @@ static int set_config_network_ipv6_gateway(const char *key, const char *value,
free(netdev->ipv6_gateway);
if (lxc_config_value_empty(value)) {
netdev->ipv6_gateway = NULL;
return 0;
}
if (!strcmp(value, "auto")) {
netdev->ipv6_gateway = NULL;
netdev->ipv6_gateway_auto = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment