mirror_frr/zebra
Stephen Worley 7c2ddfb976 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>
2021-06-08 15:05:43 -04:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
connected.c zebra: fix possible uninitialized value 2021-05-19 14:59:00 +03:00
connected.h zebra: Do not use connection dest for bcast 2019-08-18 18:54:46 +02:00
debug_nl.c zebra: human readable netlink dumps 2020-09-23 23:07:02 -03:00
debug.c zebra: storage of gre information in zebra layer 2021-04-30 10:33:15 +02:00
debug.h zebra: add 'detail' mpls debug setting 2021-04-05 15:53:48 -04:00
dplane_fpm_nl.c *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
if_ioctl.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
if_netlink.c zebra: Consolidate on 1 function netlink_parse_rattr_nested 2021-05-11 20:05:51 -04:00
if_netlink.h zebra: new dplane action to set gre link interface 2021-04-30 10:33:18 +02:00
if_sysctl.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
interface.c Merge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2 2021-05-05 07:57:04 -04:00
interface.h Merge pull request #8237 from pguibert6WIND/nhrp_use_zebra_2 2021-05-05 07:57:04 -04:00
ioctl.c zebra: ifi_link_state is the link state 2020-10-13 11:32:36 +01:00
ioctl.h *: Remove solaris from FRR 2020-09-21 10:02:20 -04:00
ipforward_proc.c zebra: Cleanup set but unused variables 2020-02-27 09:41:58 -05:00
ipforward_sysctl.c *: Remove solaris from FRR 2020-09-21 10:02:20 -04:00
ipforward.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
irdp_interface.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
irdp_main.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
irdp_packet.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
irdp.h *: strip trailing whitespace 2019-09-30 16:44:43 +00:00
kernel_netlink.c zebra: memset the struct rtattr *tb[SIZE] in setting function 2021-05-11 20:05:51 -04:00
kernel_netlink.h zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRS 2020-12-11 12:13:36 -08:00
kernel_socket.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
kernel_socket.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
label_manager.c Merge pull request #7756 from pjdruddy/bgplu-fixes 2021-01-09 15:48:22 -05:00
label_manager.h zebra: expose label-manager util-funcs 2021-01-05 18:19:44 +00:00
main.c zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
Makefile
redistribute.c Revert "bgpd: vrf route leaking, fix vrf redistribute" 2021-05-09 22:28:36 +03:00
redistribute.h zebra: revise redistribution delete to improve update case 2019-09-12 08:51:05 -04:00
rib.h zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
router-id.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
router-id.h zebra: add IPv6 router-id 2020-07-17 17:39:05 +02:00
rt_netlink.c zebra: early return on seg6local nlmsg crafting 2021-06-02 10:24:48 -04:00
rt_netlink.h Merge pull request #7162 from opensourcerouting/zebra-human-netlink 2020-12-14 14:03:35 -05:00
rt_socket.c zebra: new dplane action to set gre link interface 2021-04-30 10:33:18 +02:00
rt.h zebra: new dplane action to set gre link interface 2021-04-30 10:33:18 +02:00
rtadv.c zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
rtadv.h zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
rtread_netlink.c zebra: evpn remote delete fetch local entry 2018-12-31 14:40:31 -08:00
rtread_sysctl.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
rule_netlink.c zebra: derive rule family from src->dst->ipv4 2020-12-18 11:53:18 -05:00
rule_netlink.h zebra: netlink message batching 2020-08-10 21:42:43 +02:00
rule_socket.c zebra: convert ip rule installation to use dplane thread 2020-06-10 16:18:45 +02:00
sample_plugin.c *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
subdir.am zebra: rewrite locator_prefix_cmd with DEFPY 2021-06-02 10:24:48 -04:00
table_manager.c *: Remove solaris from FRR 2020-09-21 10:02:20 -04:00
table_manager.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
testrib.conf
zapi_msg.c *: delete ZEBRA_FLAG_SEG6*_ROUTE and add ZAPI_NEXTHOP_FLAG_SEG6* 2021-06-02 10:24:48 -04:00
zapi_msg.h *: fix code format accourding to checkpatch 2021-06-02 10:24:48 -04:00
zebra_dplane.c zebra: collect gre information and push it when needed 2021-04-30 10:33:18 +02:00
zebra_dplane.h zebra: collect gre information and push it when needed 2021-04-30 10:33:18 +02:00
zebra_errors.c zebra: ZAPI add new api to manipulate srv6-locator (step2) 2021-06-02 10:24:47 -04:00
zebra_errors.h zebra: ZAPI add new api to manipulate srv6-locator (step2) 2021-06-02 10:24:47 -04:00
zebra_evpn_mac.c zebra: Reduce size of vni hash tables to a more reasonable start size 2021-05-05 10:08:06 -04:00
zebra_evpn_mac.h zebra: link local MACs to destination port for efficient lacp-bypass processing 2021-02-24 08:11:24 -08:00
zebra_evpn_mh.c zebra: Use __func__ instead of __PRETTY_FUNCTION__ 2021-05-12 12:02:05 -04:00
zebra_evpn_mh.h lib/zebra: zapi for installing EVPN nexthops from bgp 2021-03-25 17:09:53 -07:00
zebra_evpn_neigh.c zebra: Reduce size of vni hash tables to a more reasonable start size 2021-05-05 10:08:06 -04:00
zebra_evpn_neigh.h zebra: use printfrr exts in EVPN/VXLAN code 2021-03-14 22:56:07 +01:00
zebra_evpn_vxlan.h zebra: extract core EVPN functions from zebra_vxlan.c 2020-08-12 12:39:34 +01:00
zebra_evpn.c zebra: fix style warnings in previous commits 2021-05-09 19:37:12 +02:00
zebra_evpn.h zebra: support for macvlan interfaces 2020-09-11 18:26:23 +02:00
zebra_fpm_dt.c zebra: replace inet_ntoa 2020-10-22 13:37:25 -04:00
zebra_fpm_netlink.c fpm: use printfrr exts 2021-03-14 22:56:07 +01:00
zebra_fpm_private.h Zebra: Build nelink message for RMAC updates 2019-06-17 12:05:38 -07:00
zebra_fpm_protobuf.c *: Do not cast to the same type 2020-04-08 17:15:06 +03:00
zebra_fpm.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_gr.c :* Convert prefix2str to %pFX 2020-10-22 09:07:41 +03:00
zebra_l2.c zebra: storage of gre information in zebra layer 2021-04-30 10:33:15 +02:00
zebra_l2.h zebra: storage of gre information in zebra layer 2021-04-30 10:33:15 +02:00
zebra_mlag_private.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_mlag_vty.c zebra: Do not build mlag protobuf support if version 3 is not avail 2019-12-15 09:37:51 -05:00
zebra_mlag_vty.h lib, zebra: add missing extern "C" {} blocks to new header files 2020-04-22 23:49:22 -03:00
zebra_mlag.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_mlag.h *: require semicolon after DEFINE_HOOK & co. 2021-03-17 06:18:17 +01:00
zebra_mpls_netlink.c zebra: dplane FPM handle LSP install/update/delete 2020-11-27 16:32:01 +00:00
zebra_mpls_null.c zebra: convert PW updates to async dataplane 2019-01-25 10:45:57 -05:00
zebra_mpls_openbsd.c *: un-split strings across lines 2020-07-14 10:37:25 +02:00
zebra_mpls_vty.c *: move CLI node names to cmd_node->name 2020-04-16 12:53:59 +02:00
zebra_mpls.c zebra: fix style warnings in previous commits 2021-05-09 19:37:12 +02:00
zebra_mpls.h zebra: dplane FPM LSP table walk 2020-11-30 12:13:43 +00:00
zebra_mroute.c pimd, zebra: explicit cast int netlink val to uint 2021-04-28 11:43:50 -04:00
zebra_mroute.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
zebra_nb_config.c Merge pull request #8358 from idryzhov/fix-nb-vrf-crash 2021-04-01 16:42:03 -04:00
zebra_nb_rpcs.c zebra: display rpc error msg to vtysh 2020-10-05 13:57:54 -07:00
zebra_nb_state.c zebra: make ribs config false 2021-03-16 17:25:49 +03:00
zebra_nb.c zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_nb.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_netns_id.c Merge pull request #7148 from pguibert6WIND/fix_fd_not_closed 2020-09-23 07:40:14 -04:00
zebra_netns_id.h zebra: dynamically detect vxlan link interfaces in other netns 2020-09-11 18:26:23 +02:00
zebra_netns_notify.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_netns_notify.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
zebra_nhg_private.h lib, zebra: add missing extern "C" {} blocks to new header files 2020-04-22 23:49:22 -03:00
zebra_nhg.c lib,sharpd,zebra: update nexthop object with nh_srv6 2021-06-02 10:24:48 -04:00
zebra_nhg.h Merge pull request #8488 from mjstapp/more_workqueue 2021-04-27 11:59:33 -04:00
zebra_ns.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_ns.h lib, zebra: reuse and adapt ns_list walk functionality 2020-09-11 18:26:23 +02:00
zebra_opaque.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_opaque.h zebra: add zebra opaque module 2020-06-02 08:20:54 -04:00
zebra_pbr.c zebra: Use __func__ instead of __PRETTY_FUNCTION__ 2021-05-12 12:02:05 -04:00
zebra_pbr.h *: require semicolon after DEFINE_HOOK & co. 2021-03-17 06:18:17 +01:00
zebra_ptm_redistribute.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_ptm_redistribute.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
zebra_ptm.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_ptm.h add cplusplus guards to all zebra headers 2019-03-25 16:05:27 +01:00
zebra_pw.c *: require semicolon after DEFINE_QOBJ & co. 2021-03-17 06:18:37 +01:00
zebra_pw.h *: require semicolon after DEFINE_QOBJ & co. 2021-03-17 06:18:37 +01:00
zebra_rib.c Merge pull request #8535 from opensourcerouting/zlog-rnode 2021-05-18 09:50:42 +03:00
zebra_rnh.c zebra: optionally hide backup-nexthop events in nht 2021-04-08 11:03:49 -04:00
zebra_rnh.h zebra: add config control to hide backup nh events in nht 2021-04-07 15:38:09 -04:00
zebra_routemap_nb_config.c zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_routemap_nb.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
zebra_routemap_nb.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_routemap.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_routemap.h zebra: North-bound implementation for zebra rmaps 2021-03-30 22:58:42 +03:00
zebra_router.c zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
zebra_router.h zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
zebra_snmp.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
zebra_srte.c zebra: kill zebra_memory.h, use MTYPE_STATIC 2021-03-22 20:02:17 +01:00
zebra_srte.h lib, zebra: Add SR-TE policy infrastructure to zebra 2020-08-07 11:08:49 +02:00
zebra_srv6_vty.c *: fix code format accourding to checkpatch 2021-06-02 10:24:48 -04:00
zebra_srv6_vty.h *: new cli-nodes for SRv6 manager (step2) 2021-06-02 10:24:47 -04:00
zebra_srv6.c zebra: fix Dereference of null pointer 2021-06-02 10:24:48 -04:00
zebra_srv6.h *: fix code format accourding to checkpatch 2021-06-02 10:24:48 -04:00
zebra_vrf.c zebra: rework RA handling for vrf-lite 2021-06-08 15:05:43 -04:00
zebra_vrf.h zebra: fix config after exit from vrf 2021-06-04 19:02:32 +03:00
zebra_vty.c bgpd,sharpd,zebra: fix code style 2021-06-02 10:24:48 -04:00
zebra_vxlan_private.h *: require semicolon after DEFINE_HOOK & co. 2021-03-17 06:18:17 +01:00
zebra_vxlan.c Merge pull request #8646 from chiragshah6/mdev 2021-05-18 11:45:56 +01:00
zebra_vxlan.h zebra: support for slow-failover of local MACs on an ES 2020-12-01 09:46:26 -08:00
zserv.c *: drop zassert.h 2021-04-23 12:06:35 +02:00
zserv.h zebra: link layer config and notification, implementation in zebra 2021-04-09 18:29:58 +02:00