]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: clear vlan id 1707/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 17 Jul 2017 11:34:20 +0000 (13:34 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 17 Jul 2017 11:34:20 +0000 (13:34 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile.c

index 0597d8e3b5ac909d4e8dd9c418bbe3c9aa19ca65..6a6f549c9ed39c4a830ad117766616e64e01e741 100644 (file)
@@ -988,6 +988,11 @@ static int set_config_network_vlan_id(const char *key, const char *value,
                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))
                return -1;