]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
network: Updates instantiate_veth to support OVS VLAN setup 3439/head
authorThomas Parrott <thomas.parrott@canonical.com>
Mon, 8 Jun 2020 10:34:43 +0000 (11:34 +0100)
committerThomas Parrott <thomas.parrott@canonical.com>
Tue, 9 Jun 2020 09:07:56 +0000 (10:07 +0100)
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
src/lxc/network.c

index 077eb7de1ca4772aebd4e8b37c869c684d4c55dc..2ff053ecaec00864e6ccbb94717892bb45921d54 100644 (file)
@@ -624,7 +624,14 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
                }
                INFO("Attached \"%s\" to bridge \"%s\"", veth1, netdev->link);
 
-               if (!is_ovs_bridge(netdev->link)) {
+               if (is_ovs_bridge(netdev->link)) {
+                       err = setup_veth_ovs_bridge_vlan(veth1, netdev);
+                       if (err) {
+                               SYSERROR("Failed to setup openvswitch bridge vlan on \"%s\"", veth1);
+                               lxc_ovs_delete_port(netdev->link, veth1);
+                               goto out_delete;
+                       }
+               } else {
                        err = setup_veth_native_bridge_vlan(veth1, netdev);
                        if (err) {
                                SYSERROR("Failed to setup native bridge vlan on \"%s\"", veth1);