From 6fdcc3daa40ebfcb793998b6e4527dd6db03cfb7 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Fri, 8 Oct 2021 07:30:47 +0000 Subject: 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 Change-Id: If3a83d03a3000f28820d9a9cb4101d244803d084 --- src/plugins/wireguard/wireguard_if.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/wireguard') diff --git a/src/plugins/wireguard/wireguard_if.c b/src/plugins/wireguard/wireguard_if.c index ad8f42c1969..64e405608f4 100644 --- a/src/plugins/wireguard/wireguard_if.c +++ b/src/plugins/wireguard/wireguard_if.c @@ -315,6 +315,8 @@ wg_if_create (u32 user_instance, ip_address_copy (&wg_if->src_ip, src_ip); wg_if->sw_if_index = *sw_if_indexp = hi->sw_if_index; + vnet_set_interface_l3_output_node (vnm->vlib_main, hi->sw_if_index, + (u8 *) "tunnel-output"); return 0; } @@ -359,6 +361,7 @@ wg_if_delete (u32 sw_if_index) udp_unregister_dst_port (vlib_get_main (), wg_if->port, 0); } + vnet_reset_interface_l3_output_node (vnm->vlib_main, sw_if_index); vnet_delete_hw_interface (vnm, hw->hw_if_index); pool_put_index (noise_local_pool, wg_if->local_idx); pool_put (wg_if_pool, wg_if); -- cgit 1.2.3-korg