From 436a6a3e5126549d4482d5813ddd57b8c02215af Mon Sep 17 00:00:00 2001 From: Trey Aspelund Date: Thu, 31 Mar 2022 16:35:18 +0000 Subject: [PATCH] zebra: don't send RAs w/o LLv6 or on bridge-ports It's confusing for a user to see 'Tx RA failed' in the logs when they've enabled RAs (either through interface config or BGP unnumbered) on an interface that can't send them. Let's avoid sending RAs on interfaces that are bridge_slaves or don't have a link-local address, since they are the two of the most common reasons for RA Tx failures. Signed-off-by: Trey Aspelund --- zebra/rtadv.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 2ce5072945..ca833999cb 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -490,9 +490,11 @@ static void rtadv_timer(struct thread *thread) RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) FOR_ALL_INTERFACES (vrf, ifp) { - if (if_is_loopback(ifp) || !if_is_operative(ifp) - || (vrf_is_backend_netns() - && ifp->vrf->vrf_id != zvrf->vrf->vrf_id)) + if (if_is_loopback(ifp) || !if_is_operative(ifp) || + IS_ZEBRA_IF_BRIDGE_SLAVE(ifp) || + !connected_get_linklocal(ifp) || + (vrf_is_backend_netns() && + ifp->vrf->vrf_id != zvrf->vrf->vrf_id)) continue; zif = ifp->info; -- 2.39.5