From 38790036a81fe7088655408806e3e76c99260be8 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 8 Jun 2020 11:34:43 +0100 Subject: [PATCH] network: Updates instantiate_veth to support OVS VLAN setup Signed-off-by: Thomas Parrott --- src/lxc/network.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- 2.47.2