From 97845c93d8cd619fa75aa4ca679a63cfef0cc3f5 Mon Sep 17 00:00:00 2001 From: Archana Shinde Date: Tue, 7 Nov 2023 00:49:21 -0800 Subject: [PATCH] network: Fix network hotplug for ipvlan and macvlan endpoints. Since moving from network coldplug to hotplug, the only case verified was veth endpoints. Support for network hotplug for ipvlan and macvlan was broken/not added. Fix it. Fixes: #8391 Signed-off-by: Archana Shinde (cherry picked from commit a6272733e7e2e1fe27da3714644c7483cb0923f5) --- src/runtime/virtcontainers/qemu.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/runtime/virtcontainers/qemu.go b/src/runtime/virtcontainers/qemu.go index 03b5fa676a..3ab0747484 100644 --- a/src/runtime/virtcontainers/qemu.go +++ b/src/runtime/virtcontainers/qemu.go @@ -1884,9 +1884,8 @@ func (q *qemu) hotplugNetDevice(ctx context.Context, endpoint Endpoint, op Opera var tap TapInterface switch endpoint.Type() { - case VethEndpointType: - drive := endpoint.(*VethEndpoint) - tap = drive.NetPair.TapInterface + case VethEndpointType, IPVlanEndpointType, MacvlanEndpointType, TuntapEndpointType: + tap = endpoint.NetworkPair().TapInterface case TapEndpointType: drive := endpoint.(*TapEndpoint) tap = drive.TapInterface