mirror_frr/zebra
vivek 22bd3e9497 *: Refine the notion of a configured VRF in FRR
Refine the notion of what FRR considers as "configured" VRF. It is no longer
based on user just typing "vrf FOO" but when something is actually configured
against that VRF. Right now, in zebra, the only configuration against a VRF
are static IP routes and EVPN L3 VNI. Whenever a configuration is removed,
check and clear the "configured" flag if there is no other configuration for
this VRF. When user attempts to configure a static route and the VRF doesn't
exist, a VRF is created; the VRF is only active when also defined in the
kernel.

Updates: 8b73ea7bd479030418ca06eef59d0648d913b620
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>

Ticket: CM-10139, CM-18553
Reviewed By: CCR-7019
Testing Done:
1. Manual testing for L3 VNI and static routes - FRR restart, networking
restart etc.
2. 'vrf' smoke

<DETAILED DESCRIPTION (REPLACE)>
2018-01-23 18:49:40 -08:00
..
.gitignore build: convert zebra/ to non-recursive build 2017-07-31 23:03:30 +02:00
client_main.c *: Make zapi route install Notifications optional 2017-11-27 09:09:35 -05:00
connected.c zebra: Add nh_vrf_id to rib_add 2018-01-12 09:20:36 -05:00
connected.h zebra: Refactor connected_down_ipv[4|6] 2017-08-31 13:47:26 -04:00
debug.c *: add missing \n in some help strings 2017-10-24 19:30:30 -02:00
debug.h zebra: add pseudowire manager 2017-08-09 12:35:15 +02:00
GNOME-PRODUCT-ZEBRA-MIB Initial revision 2002-12-13 20:15:29 +00:00
GNOME-SMI Initial revision 2002-12-13 20:15:29 +00:00
if_ioctl_solaris.c *: introduce new rb-tree to optimize interface lookup by ifindex 2017-10-10 09:05:02 -03:00
if_ioctl.c *: use the FOR_ALL_INTERFACES abstraction from babeld 2017-10-10 09:05:46 -03:00
if_netlink.c zebra: Add one-shot thread to recheck speed 2018-01-11 09:52:34 -05:00
if_netlink.h *: reindent 2017-07-17 14:04:07 +02:00
if_sysctl.c build: zebra: remove *_method Makefile hacks 2017-07-31 23:03:30 +02:00
interface.c zebra: Install connected routes during VRF change only if interface is up 2018-01-21 09:34:15 -05:00
interface.h zebra: Add one-shot thread to recheck speed 2018-01-11 09:52:34 -05:00
ioctl_solaris.c build: zebra: remove *_method Makefile hacks 2017-07-31 23:03:30 +02:00
ioctl_solaris.h *: reindent 2017-07-17 14:04:07 +02:00
ioctl.c zebra: remove useless iotcl linux calls 2017-12-13 16:54:10 +01:00
ioctl.h *: reindent 2017-07-17 14:04:07 +02:00
ipforward_proc.c bgpd, zebra: Use sscanf return value 2017-12-04 21:28:19 -05:00
ipforward_solaris.c build: zebra: remove *_method Makefile hacks 2017-07-31 23:03:30 +02:00
ipforward_sysctl.c configure, zebra: Kame is not responsible for on/off of v6 forwarding 2017-12-05 17:26:32 -05:00
ipforward.h *: reindent 2017-07-17 14:04:07 +02:00
irdp_interface.c *: Convert list_delete(struct list *) to ** to allow nulling 2017-10-05 10:53:13 -04:00
irdp_main.c *: use the FOR_ALL_INTERFACES abstraction from babeld 2017-10-10 09:05:46 -03:00
irdp_packet.c *: fix assorted issues detected by Coverity Scan 2017-08-24 21:49:39 -03:00
irdp.h zebra: Fix irdp so it doesn't crash when looked at 2017-09-26 19:57:27 -04:00
kernel_netlink.c zebra: Make zserv.h the true api for zapi northbound 2017-12-13 07:57:15 -05:00
kernel_netlink.h *: reindent 2017-07-17 14:04:07 +02:00
kernel_socket.c zebra: Add nh_vrf_id to rib_add 2018-01-12 09:20:36 -05:00
kernel_socket.h zebra: cleanup blackhole support 2017-08-28 05:07:51 +02:00
label_manager.c zebra: use zclient_create_header 2018-01-22 11:55:22 -05:00
label_manager.h *: reindent 2017-07-17 14:04:07 +02:00
main.c zebra: Move NS/VRF initialization earlier 2018-01-12 09:22:44 -05:00
Makefile build: convert zebra/ to non-recursive build 2017-07-31 23:03:30 +02:00
redistribute.c zebra: proper refcounting for rmac/nh entries 2017-12-14 10:57:06 -08:00
redistribute.h *: Cleanup multiple is_default... code 2017-08-31 16:11:17 -04:00
rib.h zebra: Move ip route ... generation to vrf control 2018-01-12 09:26:41 -05:00
router-id.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
router-id.h *: make consistent & update GPLv2 file headers 2017-05-15 16:37:41 +02:00
rt_netlink.c Merge pull request #1618 from donaldsharp/zebra_startup_ordering 2018-01-23 08:25:01 +01:00
rt_netlink.h sharpd: Add Super Happy Advanced Routing Protocol 2017-11-27 09:16:30 -05:00
rt_socket.c lib, zebra: Rename and place appropriately the label stack 2018-01-22 11:55:22 -05:00
rt.h zebra: Add one-shot thread to recheck speed 2018-01-11 09:52:34 -05:00
rtadv.c zebra: do not display ipv6 ra commands created by bgpd 2017-12-06 09:00:48 -08:00
rtadv.h zebra: No need to pass sock descriptor around. 2017-10-23 18:09:22 -04:00
rtread_getmsg.c zebra: Add nh_vrf_id to rib_add 2018-01-12 09:20:36 -05:00
rtread_netlink.c zebra: Make zserv.h the true api for zapi northbound 2017-12-13 07:57:15 -05:00
rtread_sysctl.c zebra: Make zserv.h the true api for zapi northbound 2017-12-13 07:57:15 -05:00
subdir.am zebra: irdp: convert into module 2017-08-15 13:26:55 +02:00
testrib.conf zebra: Build the test client, can be useful, and add IPv6 to testrib.conf 2016-05-26 01:13:58 +00:00
zebra_fpm_dt.c *: reindent 2017-07-17 14:04:07 +02:00
zebra_fpm_netlink.c zebra: cleanup blackhole support 2017-08-28 05:07:51 +02:00
zebra_fpm_private.h *: reindent 2017-07-17 14:04:07 +02:00
zebra_fpm_protobuf.c zebra: cleanup blackhole support 2017-08-28 05:07:51 +02:00
zebra_fpm.c zebra: Add some more debug information on read issues in FPM 2018-01-18 09:31:20 -05:00
zebra_l2_null.c *: reindent 2017-07-17 14:04:07 +02:00
zebra_l2.c *: use the FOR_ALL_INTERFACES abstraction from babeld 2017-10-10 09:05:46 -03:00
zebra_l2.h Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
zebra_memory.c *: reindent 2017-07-17 14:04:07 +02:00
zebra_memory.h zebra: Refactor 'struct rib' to be 'struct route_entry' 2017-06-01 08:00:05 -04:00
zebra_mpls_netlink.c zebra: Fix route replace flags 2017-11-29 13:01:01 -05:00
zebra_mpls_null.c zebra: Fix lsp add/del from kernel using SETFLAG 2017-11-29 13:01:00 -05:00
zebra_mpls_openbsd.c zebra: Fix lsp add/del from kernel using SETFLAG 2017-11-29 13:01:00 -05:00
zebra_mpls_vty.c zebra: remove redundant DEFUNs for labeled static routes 2017-07-27 21:47:23 -03:00
zebra_mpls.c *: Handle VRF configuration when VRF gets inactivated and activated 2018-01-23 16:24:35 -08:00
zebra_mpls.h *: Handle VRF configuration when VRF gets inactivated and activated 2018-01-23 16:24:35 -08:00
zebra_mroute.c zebra: use zclient_create_header 2018-01-22 11:55:22 -05:00
zebra_mroute.h zebra: No need to pass sock descriptor around. 2017-10-23 18:09:22 -04:00
zebra_ns.c *: Handle VRF configuration when VRF gets inactivated and activated 2018-01-23 16:24:35 -08:00
zebra_ns.h lib: ns_id_t changed to 32 bit 2018-01-22 13:52:24 +01:00
zebra_ptm_redistribute.c zebra: use zclient_create_header 2018-01-22 11:55:22 -05:00
zebra_ptm_redistribute.h *: reindent 2017-07-17 14:04:07 +02:00
zebra_ptm.c lib: increase vrf_id from 16 bit to 32 bit identifier 2018-01-22 13:52:17 +01:00
zebra_ptm.h zebra: No need to pass sock descriptor around. 2017-10-23 18:09:22 -04:00
zebra_pw.c zebra, ldpd: fix display of pseudowire status 2017-11-29 20:39:19 -02:00
zebra_pw.h zebra: add support for static pseudowires 2017-08-09 13:03:36 +02:00
zebra_rib.c Merge pull request #1618 from donaldsharp/zebra_startup_ordering 2018-01-23 08:25:01 +01:00
zebra_rnh.c Merge pull request #1618 from donaldsharp/zebra_startup_ordering 2018-01-23 08:25:01 +01:00
zebra_rnh.h zebra: add nexthop tracking for pseudowires 2017-08-09 12:35:15 +02:00
zebra_routemap.c zebra: Allow static non interface based routes to leak 2018-01-12 09:26:42 -05:00
zebra_routemap.h zebra: Make zserv.h the true api for zapi northbound 2017-12-13 07:57:15 -05:00
zebra_snmp.c *: use clang's 'ForEachMacros' format style option 2017-09-15 14:53:46 -03:00
zebra_static.c Merge pull request #1618 from donaldsharp/zebra_startup_ordering 2018-01-23 08:25:01 +01:00
zebra_static.h zebra: Add the zvrf pointer to the 'struct static_route' 2018-01-12 09:22:46 -05:00
zebra_vrf.c *: Refine the notion of a configured VRF in FRR 2018-01-23 18:49:40 -08:00
zebra_vrf.h *: Refine the notion of a configured VRF in FRR 2018-01-23 18:49:40 -08:00
zebra_vty.c *: Refine the notion of a configured VRF in FRR 2018-01-23 18:49:40 -08:00
zebra_vxlan_null.c *: Handle VRF configuration when VRF gets inactivated and activated 2018-01-23 16:24:35 -08:00
zebra_vxlan_private.h bgpd: advertise VNI subnet 2018-01-23 15:58:53 -08:00
zebra_vxlan.c *: Refine the notion of a configured VRF in FRR 2018-01-23 18:49:40 -08:00
zebra_vxlan.h *: Handle VRF configuration when VRF gets inactivated and activated 2018-01-23 16:24:35 -08:00
zebra.conf.sample *: Remove cvs control points 2017-12-05 17:28:12 -05:00
zserv.c bgpd: advertise VNI subnet 2018-01-23 15:58:53 -08:00
zserv.h bgpd: advertise VNI subnet 2018-01-23 15:58:53 -08:00