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