summaryrefslogtreecommitdiffstats
path: root/src/plugins/memif
diff options
context:
space:
mode:
authorDaniel Béreš <daniel.beres@pantheon.tech>2021-11-03 08:55:04 +0000
committerDamjan Marion <dmarion@me.com>2021-11-09 09:54:34 +0000
commit90c397c505d35498b59756020e2d465f1b45e871 (patch)
tree54e39e758ed0e0764856806548e56aa9671d8cd0 /src/plugins/memif
parentf7b1f8a8911b51e01f7ecd79d25eb8d89da74884 (diff)
memif: memif linkstate can't become up
Admin down implies Link down but nothing came with admin up. Ticket: VPP-1959 Type: fix Change-Id: I43725329ae7918659c73d703280c25de5f0b1d14 Signed-off-by: Daniel Béreš <daniel.beres@pantheon.tech>
Diffstat (limited to 'src/plugins/memif')
-rw-r--r--src/plugins/memif/memif.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/memif/memif.c b/src/plugins/memif/memif.c
index 886721aef75..4d662faae9e 100644
--- a/src/plugins/memif/memif.c
+++ b/src/plugins/memif/memif.c
@@ -1086,7 +1086,14 @@ memif_interface_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
static clib_error_t *error = 0;
if (flags & VNET_SW_INTERFACE_FLAG_ADMIN_UP)
- mif->flags |= MEMIF_IF_FLAG_ADMIN_UP;
+ {
+ if (mif->flags & MEMIF_IF_FLAG_CONNECTED)
+ {
+ vnet_hw_interface_set_flags (vnm, mif->hw_if_index,
+ VNET_HW_INTERFACE_FLAG_LINK_UP);
+ }
+ mif->flags |= MEMIF_IF_FLAG_ADMIN_UP;
+ }
else
mif->flags &= ~MEMIF_IF_FLAG_ADMIN_UP;