confile: add clearer for lxc.network

parent e2410c4e
......@@ -171,6 +171,7 @@ static int clr_config_network_item(const char *, struct lxc_conf *);
static int set_config_network(const char *, const char *, struct lxc_conf *);
static int get_config_network(const char *, char *, int, struct lxc_conf *);
static int clr_config_network(const char *, struct lxc_conf *);
static int set_config_cap_drop(const char *, const char *, struct lxc_conf *);
static int get_config_cap_drop(const char *, char *, int, struct lxc_conf *);
......@@ -283,7 +284,7 @@ static struct lxc_config_t config[] = {
{ "lxc.network.ipv6.gateway", set_config_network_ipv6_gateway, get_config_network_item, clr_config_network_item, },
{ "lxc.network.ipv6", set_config_network_ipv6, get_config_network_item, clr_config_network_item, },
{ "lxc.network.", set_config_network_nic, get_config_network_item, clr_config_network_item, },
{ "lxc.network", set_config_network, get_config_network, NULL },
{ "lxc.network", set_config_network, get_config_network, clr_config_network, },
{ "lxc.cap.drop", set_config_cap_drop, get_config_cap_drop, NULL },
{ "lxc.cap.keep", set_config_cap_keep, get_config_cap_keep, NULL },
{ "lxc.console.logfile", set_config_console_logfile, get_config_console_logfile, NULL },
......@@ -2753,10 +2754,7 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key)
{
int ret = 0;
if (strcmp(key, "lxc.network") == 0) {
ret = lxc_clear_config_network(c);
} else if (strcmp(key, "lxc.cap.drop") == 0) {
if (strcmp(key, "lxc.cap.drop") == 0) {
ret = lxc_clear_config_caps(c);
} else if (strcmp(key, "lxc.cap.keep") == 0) {
......@@ -4169,3 +4167,9 @@ static inline int clr_config_network_item(const char *key, struct lxc_conf *c)
{
return lxc_clear_nic(c, key + 12);
}
static inline int clr_config_network(const char *key, struct lxc_conf *c)
{
return lxc_clear_config_network(c);
}
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