wireguard: fix fib entry tracking 16/36916/1
authorAlexander Chernavin <achernavin@netgate.com>
Wed, 17 Aug 2022 08:30:43 +0000 (08:30 +0000)
committerAlexander Chernavin <achernavin@netgate.com>
Wed, 17 Aug 2022 09:04:27 +0000 (09:04 +0000)
commitae605389253805e07bb293b056e012cdaf5593b2
tree89bf398167a2b3091c70dde3a00f484bd47fde2e
parentd5e4e25849be4e58420de5c0d02ab4e244f334b6
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
src/plugins/wireguard/wireguard_peer.c
src/plugins/wireguard/wireguard_peer.h
test/test_wireguard.py