From bd3265b77f84dbfaed51fc406016d08b686f80a3 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Wed, 12 Apr 2023 10:52:40 +0200 Subject: [PATCH] backport https://gerrit.fd.io/r/c/vpp/+/38602 --- lcpng_interface.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lcpng_interface.c b/lcpng_interface.c index ef3b8fc..798eadc 100644 --- a/lcpng_interface.c +++ b/lcpng_interface.c @@ -787,6 +787,12 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name, return VNET_API_ERROR_INVALID_SW_IF_INDEX; } + if (hw->hw_class_index != ethernet_hw_interface_class.index && + host_if_type == LCP_ITF_HOST_TAP) { + LCP_ITF_PAIR_ERR ( + "pair_create: don't create TAP for non-eth interface; use tun"); + return VNET_API_ERROR_INVALID_ARGUMENT; + } /* * Use interface-specific netns if supplied.