aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/wireguard/wireguard_peer.h
diff options
context:
space:
mode:
authorAlexander Chernavin <achernavin@netgate.com>2022-08-17 08:30:43 +0000
committerAlexander Chernavin <achernavin@netgate.com>2022-08-17 09:04:27 +0000
commitae605389253805e07bb293b056e012cdaf5593b2 (patch)
tree89bf398167a2b3091c70dde3a00f484bd47fde2e /src/plugins/wireguard/wireguard_peer.h
parentd5e4e25849be4e58420de5c0d02ab4e244f334b6 (diff)
wireguard: fix fib entry tracking
Type: fix After peers roaming support addition, FIB entry tracking stopped working. For example, it can be observed when an adjacency is stacked on a FIB entry by the plugin and the FIB entry hasn't got ARP resolution yet. Once the FIB entry gets ARP resolution, the adjacency is not re-stacked as it used to. This results in endless ARP requests when a traffic is sent via the adjacency. This is broken because the plugin stopped using "midchain delegate" with peers roaming support addition. The reason is that "midchain delegate" didn't support stacking on a different FIB entry which is needed when peer's endpoint changes. Now it is supported there (added in 36892). With this fix, start using "midchane delegate" again and thus, fix FIB entry tracking. Also, cover this in tests. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: Iea91f38739ab129e601fd6567b52565dbd649371
Diffstat (limited to 'src/plugins/wireguard/wireguard_peer.h')
-rw-r--r--src/plugins/wireguard/wireguard_peer.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/plugins/wireguard/wireguard_peer.h b/src/plugins/wireguard/wireguard_peer.h
index c07ea894b36..85df0727902 100644
--- a/src/plugins/wireguard/wireguard_peer.h
+++ b/src/plugins/wireguard/wireguard_peer.h
@@ -68,13 +68,6 @@ typedef enum
WG_PEER_ESTABLISHED = 0x2,
} wg_peer_flags;
-typedef struct wg_peer_adj_t_
-{
- adj_index_t adj_index;
- fib_node_index_t fib_entry_index;
- u32 sibling_index;
-} wg_peer_adj_t;
-
typedef struct wg_peer
{
noise_remote_t remote;
@@ -87,7 +80,7 @@ typedef struct wg_peer
wg_peer_endpoint_t dst;
wg_peer_endpoint_t src;
u32 table_id;
- wg_peer_adj_t *adjs;
+ adj_index_t *adj_indices;
/* rewrite built from address information */
u8 *rewrite;