🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Nikolay Aleksandrov Sat, 31 Oct 2026 07:03
Re: [PATCH net] vxlan: Stop rejecting dynamic FDB entries with a nexthop ID
#9098
Author: Nikolay Aleksandrov
Date: Sat, 31 Oct 2026 07:03
97 lines
15525 bytes
On 30/10/2026 15:37, Ido Schimmel wrote:
> Commit 98fc57d16744 ("vxlan: reject dynamic fdb entries that reference a
> nexthop id") started rejecting FDB entries that point to FDB nexthops
> unless they are configured as "permanent" or "static". The intent was to
> prevent such entries from being aged out by vxlan_cleanup(), which runs
> without RTNL and can therefore race with other VXLAN devices that modify
> the same per-nexthop FDB list.
> 
> However, FRR installs remote MACs that are behind a multihomed Ethernet
> Segment (EVPN-MH) as dynamic FDB entries that point to an FDB nexthop
> group. Since the above commit, these entries are rejected and traffic
> towards the corresponding MACs is flooded to all the remote VTEPs.
> 
> These entries are also marked as externally learned ("extern_learn")
> and are therefore skipped by vxlan_cleanup(), but exempting externally
> learned entries from the checks is not enough: vxlan_cleanup() reads
> the state and flags of an entry without the hash lock, so an entry that
> is concurrently changed from dynamic and externally learned to static
> can still be aged out.
> 
> Instead, remove the checks added by the above commit and make
> vxlan_cleanup() skip FDB entries that point to FDB nexthops. Such
> entries can only be configured from user space, cannot be learned and
> cannot roam, so there is no reason to age them out. The nexthop pointer
> of an FDB entry is set before the entry is linked and is only cleared
> after it was unlinked and an RCU grace period has passed, so it can be
> checked without the hash lock.
> 
> Adjust the test cases added by the above commit and add a test case
> that checks that dynamic FDB entries that point to FDB nexthops are not
> aged out. Without the fix:
> 
>   # ./fib_nexthops.sh -t "ipv4_fdb_grp_fcnal ipv6_fdb_grp_fcnal"
> 
>   IPv4 fdb groups functional
>   --------------------------
>   [...]
>   TEST: Fdb mac add with nexthop group and dynamic state              [FAIL]
>   TEST: Fdb mac add with nexthop group and extern_learn               [FAIL]
>   TEST: Fdb mac without nexthop group aged out                        [ OK ]
>   TEST: Fdb mac with nexthop group not aged out                       [FAIL]
>   [...]
> 
>   IPv6 fdb groups functional
>   --------------------------
>   [...]
>   TEST: Fdb mac add with nexthop group and dynamic state              [FAIL]
>   TEST: Fdb mac add with nexthop group and extern_learn               [FAIL]
>   TEST: Fdb mac without nexthop group aged out                        [ OK ]
>   TEST: Fdb mac with nexthop group not aged out                       [FAIL]
>   [...]
> 
>   Tests passed:  44
>   Tests failed:   6
>   Tests skipped:  0
> 
> With the fix:
> 
>   # ./fib_nexthops.sh -t "ipv4_fdb_grp_fcnal ipv6_fdb_grp_fcnal"
> 
>   IPv4 fdb groups functional
>   --------------------------
>   [...]
>   TEST: Fdb mac add with nexthop group and dynamic state              [ OK ]
>   TEST: Fdb mac add with nexthop group and extern_learn               [ OK ]
>   TEST: Fdb mac without nexthop group aged out                        [ OK ]
>   TEST: Fdb mac with nexthop group not aged out                       [ OK ]
>   [...]
> 
>   IPv6 fdb groups functional
>   --------------------------
>   [...]
>   TEST: Fdb mac add with nexthop group and dynamic state              [ OK ]
>   TEST: Fdb mac add with nexthop group and extern_learn               [ OK ]
>   TEST: Fdb mac without nexthop group aged out                        [ OK ]
>   TEST: Fdb mac with nexthop group not aged out                       [ OK ]
>   [...]
> 
>   Tests passed:  50
>   Tests failed:   0
>   Tests skipped:  0
> 
> Fixes: 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries")
> Fixes: 98fc57d16744 ("vxlan: reject dynamic fdb entries that reference a nexthop id")
> Cc: stable@vger.kernel.org
> Reported-by: Sascha Frey <sf@techfak.net>
> Closes: https://lore.kernel.org/netdev/20261028142928.GA8406@techfak.de/
> Tested-by: Sascha Frey <sf@techfak.net>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
>   drivers/net/vxlan/vxlan_core.c              | 14 ++------
>   tools/testing/selftests/net/fib_nexthops.sh | 40 ++++++++++++++-------
>   2 files changed, 31 insertions(+), 23 deletions(-)
> 

Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads