From: Thomas Parrott Date: Mon, 8 Jun 2020 10:34:43 +0000 (+0100) Subject: network: Updates instantiate_veth to support OVS VLAN setup X-Git-Tag: lxc-5.0.0~422^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3439%2Fhead;p=thirdparty%2Flxc.git network: Updates instantiate_veth to support OVS VLAN setup Signed-off-by: Thomas Parrott --- diff --git a/src/lxc/network.c b/src/lxc/network.c index 077eb7de1..2ff053eca 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -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);