aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/linux-cp/lcp_interface.c
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-05-21 09:47:08 +0000
committerMatthew Smith <mgsmith@netgate.com>2021-05-25 14:34:57 +0000
commit6bb77dec7074e6b7b27d6bc94238bcddda375a66 (patch)
tree44316c04ad5870fa64acd595a074ed02de539613 /src/plugins/linux-cp/lcp_interface.c
parent01930f568a2472a3352ab80ea1d3b4cccf4ae0c7 (diff)
linux-cp: A V2 variant of pair create API that returns the host
interface created Type: improvement Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I31a83cd50513078895078bae3ae11372d351ddcd
Diffstat (limited to 'src/plugins/linux-cp/lcp_interface.c')
-rw-r--r--src/plugins/linux-cp/lcp_interface.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/linux-cp/lcp_interface.c b/src/plugins/linux-cp/lcp_interface.c
index 0dcac4857cf..e33c34b5f6a 100644
--- a/src/plugins/linux-cp/lcp_interface.c
+++ b/src/plugins/linux-cp/lcp_interface.c
@@ -640,7 +640,8 @@ lcp_itf_set_vif_link_state (u32 vif_index, u8 up, u8 *ns)
int
lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name,
- lip_host_type_t host_if_type, u8 *ns)
+ lip_host_type_t host_if_type, u8 *ns,
+ u32 *host_sw_if_indexp)
{
vlib_main_t *vm;
vnet_main_t *vnm;
@@ -823,6 +824,9 @@ lcp_itf_pair_create (u32 phy_sw_if_index, u8 *host_if_name,
format_vnet_sw_if_index_name, vnet_get_main (),
host_sw_if_index, host_if_name);
+ if (host_sw_if_indexp)
+ *host_sw_if_indexp = host_sw_if_index;
+
return 0;
}
@@ -902,7 +906,7 @@ lcp_itf_pair_process (vlib_main_t *vm, vlib_node_runtime_t *rt,
lipn = &lipn_names[*lipn_index];
lcp_itf_pair_create (lipn->lipn_phy_sw_if_index,
lipn->lipn_host_name, LCP_ITF_HOST_TAP,
- lipn->lipn_namespace);
+ lipn->lipn_namespace, NULL);
}
vec_reset_length (event_data);