diff options
Diffstat (limited to 'src/vnet/devices/virtio')
-rw-r--r-- | src/vnet/devices/virtio/device.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c index 588c84b7275..856e5f275e3 100644 --- a/src/vnet/devices/virtio/device.c +++ b/src/vnet/devices/virtio/device.c @@ -531,10 +531,16 @@ virtio_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) virtio_if_t *vif = pool_elt_at_index (mm->interfaces, hw->dev_instance); if (flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP) - vif->flags |= VIRTIO_IF_FLAG_ADMIN_UP; + { + vif->flags |= VIRTIO_IF_FLAG_ADMIN_UP; + vnet_hw_interface_set_flags (vnm, vif->hw_if_index, + VNET_HW_INTERFACE_FLAG_LINK_UP); + } else - vif->flags &= ~VIRTIO_IF_FLAG_ADMIN_UP; - + { + vif->flags &= ~VIRTIO_IF_FLAG_ADMIN_UP; + vnet_hw_interface_set_flags (vnm, vif->hw_if_index, 0); + } return 0; } |