fib: Don't use [midchain] adjacencies to change an interface's feature arc 04/34004/5
authorNeale Ranns <neale@graphiant.com>
Fri, 8 Oct 2021 07:30:47 +0000 (07:30 +0000)
committerBeno�t Ganne <bganne@cisco.com>
Fri, 19 Nov 2021 14:41:28 +0000 (14:41 +0000)
commit6fdcc3daa40ebfcb793998b6e4527dd6db03cfb7
tree8b8afab4ef1f1d1f8381b388010e92e4d470022b
parentad80663eb3fd954f42607168ad4babb91cb0edcc
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
30 files changed:
src/plugins/lisp/lisp-gpe/interface.c
src/plugins/lisp/lisp-gpe/lisp_gpe_adjacency.c
src/plugins/lisp/lisp-gpe/lisp_gpe_sub_interface.c
src/plugins/pppoe/pppoe.c
src/plugins/wireguard/wireguard_if.c
src/vnet/adj/adj.h
src/vnet/adj/adj_internal.h
src/vnet/adj/adj_midchain.c
src/vnet/adj/adj_midchain_node.c
src/vnet/adj/adj_nbr.c
src/vnet/config.c
src/vnet/config.h
src/vnet/feature/feature.c
src/vnet/feature/feature.h
src/vnet/gre/gre.c
src/vnet/gre/interface.c
src/vnet/interface.c
src/vnet/interface_funcs.h
src/vnet/ipip/ipip.c
src/vnet/ipip/sixrd.c
src/vnet/ipsec/esp_encrypt.c
src/vnet/ipsec/ipsec.c
src/vnet/ipsec/ipsec.h
src/vnet/ipsec/ipsec_itf.c
src/vnet/ipsec/ipsec_itf.h
src/vnet/ipsec/ipsec_sa.h
src/vnet/ipsec/ipsec_tun.c
src/vnet/ipsec/ipsec_tun.h
src/vnet/mpls/mpls_tunnel.c
test/test_ipsec_tun_if_esp.py