From 22e907555df28e3eb39345151d6297461f594fc2 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Fri, 24 Dec 2021 20:04:08 +0000 Subject: [PATCH] Initialize the TAP carrier based on the (hardware) phy --- lcpng_interface.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lcpng_interface.c b/lcpng_interface.c index 99d02a2..27ca0bd 100644 --- a/lcpng_interface.c +++ b/lcpng_interface.c @@ -993,6 +993,10 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, else vnet_sw_interface_set_mtu (vnm, args.sw_if_index, ETHERNET_MAX_PACKET_BYTES); + /* Initialize the TAP carrier based on the (hardware) phy + */ + tap_set_carrier (args.sw_if_index, (hw->flags & VNET_HW_INTERFACE_FLAG_LINK_UP)); + /* * get the hw and ethernet of the tap */