aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoann Desmouceaux <ydesmouc@cisco.com>2017-09-20 11:00:42 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-09-22 16:02:23 +0000
commit35df2e1dc9dd639f3a28680689c1d5f3ec6d8dfc (patch)
treec48ffc9f4f0cb3d603b892779093041b0c0bee4f
parent9969a3274bfdbaa62b3528887641c5ea36a8509f (diff)
vhost-user: fix link-up status
When changing the admin state of a vhost-user interface, do not put it in link-up mode if the interface is not actually ready. Change-Id: Idbc631a7126efa79d199909f9e7656d21bd412ca Signed-off-by: Yoann Desmouceaux <ydesmouc@cisco.com>
-rw-r--r--src/vnet/devices/virtio/vhost-user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c
index 2af96ee7344..4200ed8d8f3 100644
--- a/src/vnet/devices/virtio/vhost-user.c
+++ b/src/vnet/devices/virtio/vhost-user.c
@@ -2443,7 +2443,7 @@ vhost_user_interface_admin_up_down (vnet_main_t * vnm, u32 hw_if_index,
vui->admin_up = is_up;
- if (is_up)
+ if (is_up && vui->is_up)
vnet_hw_interface_set_flags (vnm, vui->hw_if_index,
VNET_HW_INTERFACE_FLAG_LINK_UP);