From ddd3ad372ae27d1f85b7d6a171d82e2b9dfa17f0 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Fri, 24 Dec 2021 21:04:15 +0000 Subject: [PATCH] Only set carrier up when hw is up --- lcpng_interface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lcpng_interface.c b/lcpng_interface.c index 27ca0bd..9626dc5 100644 --- a/lcpng_interface.c +++ b/lcpng_interface.c @@ -995,7 +995,8 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, /* Initialize the TAP carrier based on the (hardware) phy */ - tap_set_carrier (args.sw_if_index, (hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP)); + if (hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP) + tap_set_carrier (args.sw_if_index, 1); /* * get the hw and ethernet of the tap