From 4a2f76dbabe10d72da9793be7570ada98ef6f48e Mon Sep 17 00:00:00 2001 From: LEI BAO Date: Fri, 5 Nov 2021 21:06:01 +0800 Subject: [PATCH] zebar: Fix the RA sent fail in netns mode Make the code more explicit. Signed-off-by: LEI BAO --- zebra/rtadv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/rtadv.c b/zebra/rtadv.c index a15d78f64b..ab3e55d100 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -494,7 +494,7 @@ static int rtadv_timer(struct thread *thread) RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) FOR_ALL_INTERFACES (vrf, ifp) { if (if_is_loopback_or_vrf(ifp) || !if_is_operative(ifp) - || if_lookup_by_index(ifp->ifindex, zvrf->vrf->vrf_id) == NULL) + || (vrf_is_backend_netns() && ifp->vrf_id != zvrf->vrf->vrf_id)) continue; zif = ifp->info; -- 2.39.5