summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-05-26 17:36:16 -0400
committerStephen Worley <sworley@nvidia.com>2021-06-08 15:05:43 -0400
commit7c2ddfb976af93b373bccf080ab228ce4b097244 (patch)
tree3819c521aa6d4ba465cc5f560cf52027dc536096 /zebra/zebra_router.c
parentfdb7f5d54f94225b0f70709ef44b06d10b59f535 (diff)
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_router.c')
-rw-r--r--zebra/zebra_router.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 5a00f3155d..d930f59866 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -268,8 +268,6 @@ void zebra_router_init(bool asic_offload, bool notify_on_ack)
zrouter.packets_to_process = ZEBRA_ZAPI_PACKETS_TO_PROCESS;
- zrouter.rtadv_sock = -1;
-
zebra_vxlan_init();
zebra_mlag_init();