diff options
author | Neale Ranns <neale@graphiant.com> | 2021-10-08 07:30:47 +0000 |
---|---|---|
committer | Beno�t Ganne <bganne@cisco.com> | 2021-11-19 14:41:28 +0000 |
commit | 6fdcc3daa40ebfcb793998b6e4527dd6db03cfb7 (patch) | |
tree | 8b8afab4ef1f1d1f8381b388010e92e4d470022b /src/vnet/ipip/ipip.c | |
parent | ad80663eb3fd954f42607168ad4babb91cb0edcc (diff) |
fib: Don't use [midchain] adjacencies to change an interface's feature arc
Type: fix
Using the adjacency to modify the interface's feature arc doesn't work, since there are potentially more than one adj per-interface.
Instead have the interface, when it is created, register what the end node of the feature arc is. This end node is then also used as the interface's tx node (i.e. it is used as the adjacency's next-node).
rename adj-midhcain-tx as 'tunnel-output', that's a bit more intuitive.
There's also a fix in config string handling to:
1- prevent false sharing of strings when the end node of the arc is different.
2- call registered listeners when the end node is changed
For IPSec the consequences are that one cannot provide per-adjacency behaviour using different end-nodes - this was previously done for the no-SA and an SA with no protection. These cases are no handled in the esp-encrypt node.
Signed-off-by: Neale Ranns <neale@graphiant.com>
Change-Id: If3a83d03a3000f28820d9a9cb4101d244803d084
Diffstat (limited to 'src/vnet/ipip/ipip.c')
-rw-r--r-- | src/vnet/ipip/ipip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c index 5dbe85a1c5b..2ac234eb7ca 100644 --- a/src/vnet/ipip/ipip.c +++ b/src/vnet/ipip/ipip.c @@ -348,9 +348,6 @@ ipip_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai) if (!(t->flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_INNER_HASH)) af |= ADJ_FLAG_MIDCHAIN_IP_STACK; - if (VNET_LINK_ETHERNET == adj_get_link_type (ai)) - af |= ADJ_FLAG_MIDCHAIN_NO_COUNT; - fixup = ipip_get_fixup (t, adj_get_link_type (ai), &af); adj_nbr_midchain_update_rewrite (ai, fixup, @@ -795,6 +792,8 @@ ipip_add_tunnel (ipip_transport_t transport, /* Standard default ipip MTU. */ vnet_sw_interface_set_mtu (vnm, sw_if_index, 9000); + vnet_set_interface_l3_output_node (gm->vlib_main, sw_if_index, + (u8 *) "tunnel-output"); t->tunnel_src = *src; t->tunnel_dst = *dst; @@ -840,6 +839,7 @@ ipip_del_tunnel (u32 sw_if_index) teib_walk_itf (t->sw_if_index, ipip_tunnel_delete_teib_walk, t); vnet_sw_interface_set_flags (vnm, sw_if_index, 0 /* down */ ); + vnet_reset_interface_l3_output_node (gm->vlib_main, t->sw_if_index); gm->tunnel_index_by_sw_if_index[sw_if_index] = ~0; vnet_delete_hw_interface (vnm, t->hw_if_index); hash_unset (gm->instance_used, t->user_instance); |