summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-05-26 23:36:16 +0200
committerStephen Worley <sworley@nvidia.com>2021-06-08 21:05:43 +0200
commit7c2ddfb976af93b373bccf080ab228ce4b097244 (patch)
tree3819c521aa6d4ba465cc5f560cf52027dc536096 /zebra/zebra_vrf.c
parentMerge pull request #8593 from idryzhov/cmd-ambiguous (diff)
downloadfrr-7c2ddfb976af93b373bccf080ab228ce4b097244.tar.xz
frr-7c2ddfb976af93b373bccf080ab228ce4b097244.zip
zebra: rework RA handling for vrf-lite
Rework RA handling for vrf-lite scenarios. Before we were using a single FD descriptor for polling across multiple zvrf's. This would cause us to hit this assert() in some bgp unnumbered and vrrp configs: ``` /* * What happens if we have a thread already * created for this event? */ if (thread_array[fd]) assert(!"Thread already scheduled for file descriptor"); ``` We were scheduling a thread_read on the same FD for every zvrf. With vrf-lite, RAs and ARPs are not vrf-bound, so we can just use one rtadv instance to manage them for all VRFs. We will choose the default VRF for this. This patch removes the rtadv_sock altogether for zrouter and moves the functionality this represented to the default VRF. All RAs will be handled in the default VRF under vrf-lite configs with only one poll thread started for it. This patch also extends how we track subscribed interfaces (s or msec) to use an actual sorted list by interface names rather than just a counter. With multiple daemons turning interfaces/on/off these counters can get very wrong during ifup/down events. Making them a sorted list prevents this from happening by preventing duplicates. With netns-vrf's nothing should change other than the interface list. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index a0c63e420..2430b5198 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -131,7 +131,7 @@ static int zebra_vrf_enable(struct vrf *vrf)
else
zvrf->zns = zebra_ns_lookup(NS_DEFAULT);
#if defined(HAVE_RTADV)
- rtadv_init(zvrf);
+ rtadv_vrf_init(zvrf);
#endif
/* Inform clients that the VRF is now active. This is an