diff options
author | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-05-05 18:26:18 +0200 |
---|---|---|
committer | Alberto Compagno <acompagn+fdio@cisco.com> | 2020-05-05 19:29:02 +0200 |
commit | 7415aeaa213e63caa0bc3e625219996d9c2dc93a (patch) | |
tree | c86eac2b6cbd039fda12e0f270728f55c6f7d80d /hicn-plugin/src/route.c | |
parent | 43d0ecbb1a1f7e1f72bf85441547b1678aed4350 (diff) |
[HICN-608] Added configuratin option to manage hicn behaviour with interfaces
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: I8d48237b5dce737be443ec8949ac11721158d830
Diffstat (limited to 'hicn-plugin/src/route.c')
-rw-r--r-- | hicn-plugin/src/route.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hicn-plugin/src/route.c b/hicn-plugin/src/route.c index b569d431e..3b774cd82 100644 --- a/hicn-plugin/src/route.c +++ b/hicn-plugin/src/route.c @@ -676,6 +676,13 @@ set_table_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) if (!is_add) return HICN_ERROR_NONE; + vnet_sw_interface_t * sw_int = vnet_get_sw_interface(vnm, sw_if_index); + vnet_hw_interface_t * hw_int = vnet_get_hw_interface(vnm, sw_int->hw_if_index); + + char * mpls = "mpls"; + if (strstr((char *)hw_int->name, mpls) == NULL) + return 0; + int rv = ip_table_bind (FIB_PROTOCOL_IP4, sw_if_index, HICN_FIB_TABLE, 1); if (!rv) |