mirror_frr/bgpd
Chirag Shah 1b7bb74761 bgpd: instance delete unimport evpn routes
EVPN routes (type-2/type-5) are imported from
default bgp instance (where they are learnt) to
non-default vrf instance.

When a bgp instance (default) is deleted,
unimport evpn routes from vrfs.

In absence of unimport, the imported routes in vrf
has parent path info points to default instance's path
info which is no longer valid (if instance is deleted).
When accessing parent path info leads to a crash
in non-default vrf instance.

The bgp instance is not cleaned up when
'no router bgp ASN' is performed, the instance's
reference count remains for evpn imported routes.

Ticket:CM-24484
Reviewed By:

Testing Done:
Validated via learning EVPN type-2/type-5 routes in symmetric
routing scenario.
The routes are imported to VRFs based on corresponding
L3VNI. When the default instance is removed, the evpn routes
are cleaned up from the VRF instance.

TURTLE(config)# do show bgp vrf vrf3 ipv4 unicast

   Network          Next Hop            Metric LocPrf Weight Path
*> 70.1.0.0/16      0.0.0.0                            32768 i
s  70.1.1.24/32     110.0.0.2                              0 65100 65002 i
s>                  110.0.0.2                              0 65100 65002 i
s  70.1.1.43/32     110.0.0.4                              0 65100 65004 i
s>                  110.0.0.4                              0 65100 65004 i

TURTLE(config)# no router bgp 65050
TURTLE(config)# do show bgp vrf vrf3 ipv4 unicast
No BGP prefixes displayed, 0 exist

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-04-18 09:13:55 -07:00
..
rfapi bgpd: Remove extra alloc function bgp_path_info_new 2019-04-06 20:10:52 -04:00
rfp-example Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
bgp_addpath_types.h bgpd: Re-use TX Addpath IDs where possible 2018-11-10 00:16:36 +00:00
bgp_addpath.c *: remove trailing newlines from zlog messages 2019-03-14 18:41:15 +00:00
bgp_addpath.h bgpd: Re-use TX Addpath IDs where possible 2018-11-10 00:16:36 +00:00
bgp_advertise.c *: remove casts of XMALLOC / XCALLOC 2019-02-25 23:00:46 +00:00
bgp_advertise.h bgpd: Convert adj_out to a RB tree 2018-12-07 10:26:00 -05:00
bgp_aspath.c Merge pull request #3869 from qlyoung/cocci-fixes 2019-03-06 15:54:44 +01:00
bgp_aspath.h bgpd: Code to handle BGP aggregate's as-path. 2019-02-28 20:22:30 -08:00
bgp_attr_evpn.c Merge pull request #3869 from qlyoung/cocci-fixes 2019-03-06 15:54:44 +01:00
bgp_attr_evpn.h bgpd: parse and comapre rmac attr against self mac 2019-03-04 09:56:05 -08:00
bgp_attr.c Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as 2019-04-04 16:08:42 -04:00
bgp_attr.h bgpd: Remove duplicate data structure 2018-12-12 16:10:30 -05:00
bgp_bfd.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_btoa.c bgpd: Untrusted argument (Coverity 1399380) 2018-06-19 15:00:25 +02:00
bgp_clist.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_clist.h bgpd: Use string length not sizeof the array 2019-01-16 20:43:53 -05:00
bgp_community.c Merge pull request #3869 from qlyoung/cocci-fixes 2019-03-06 15:54:44 +01:00
bgp_community.h bgpd: Code to handle BGP aggregate's communities. 2019-02-28 20:22:41 -08:00
bgp_damp.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_damp.h bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_debug.c bgpd: Remove unused bgp_debug_count function 2019-02-09 18:22:01 -05:00
bgp_debug.h bgpd: Remove unused bgp_debug_count function 2019-02-09 18:22:01 -05:00
bgp_dump.c bgpd: Abstract bgp_info retrieving/setting from info pointer 2018-11-16 09:43:35 -05:00
bgp_dump.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_ecommunity.c Merge pull request #3869 from qlyoung/cocci-fixes 2019-03-06 15:54:44 +01:00
bgp_ecommunity.h bgpd: Code to handle BGP aggregate's e-communities. 2019-02-28 20:22:41 -08:00
bgp_encap_tlv.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_encap_tlv.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_encap_types.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgp_errors.c *: spelchek 2018-10-25 20:10:57 +02:00
bgp_errors.h bgpd: Try to notice when configuration changes during startup 2018-10-01 10:58:06 -04:00
bgp_evpn_private.h bgp: fix misc evpn prefix match problems caused by using incorrect prefixlen 2019-03-13 15:49:51 -07:00
bgp_evpn_vty.c bgpd: new show cmd - bgp l2vpn evpn route vni all detail 2019-04-09 08:35:15 -07:00
bgp_evpn_vty.h bgpd: get rid of afi_header_vty_out() & co. 2017-08-29 08:36:03 +02:00
bgp_evpn.c Merge branch 'master' into evpn-session-vrf 2019-03-28 18:41:38 +01:00
bgp_evpn.h Merge branch 'master' into evpn-session-vrf 2019-03-28 18:41:38 +01:00
bgp_filter.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_filter.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_flowspec_private.h bgpd: support for show bgp ipv4 flowspec 2018-03-30 14:01:05 +02:00
bgp_flowspec_util.c bgpd: upon bgp fs study, determine if iprule can be used 2019-01-29 14:15:09 +01:00
bgp_flowspec_util.h bgpd: flowspec redirect IP info is retrieved into nh tracking 2018-12-28 18:10:26 +01:00
bgp_flowspec_vty.c bgpd: do not allocate lists on fs entries of bgp entries. 2019-03-28 16:57:59 +01:00
bgp_flowspec.c *: style for EC replacements 2018-09-13 19:38:57 +00:00
bgp_flowspec.h bgpd: Convert binfo to path 2018-10-09 14:26:30 -04:00
bgp_fsm.c bgpd: Don't prevent views from being able to connect 2019-03-06 11:35:58 -05:00
bgp_fsm.h bgpd: fix bgp_packet.c / bgp_fsm.c organization 2017-11-30 16:18:02 -05:00
bgp_io.c lib,bgpd: remove deprecated stream lib macros 2018-11-29 11:13:15 -05:00
bgp_io.h bgpd: update pthreads to use lib changes 2018-01-24 15:30:55 -05:00
bgp_keepalives.c *: Rename backet to bucket 2019-02-25 16:22:36 +00:00
bgp_keepalives.h bgpd: update pthreads to use lib changes 2018-01-24 15:30:55 -05:00
bgp_label.c bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast 2018-12-20 15:28:52 +03:00
bgp_label.h bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast 2018-12-20 15:28:52 +03:00
bgp_labelpool.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_labelpool.h bgpd, zebra: auto assign labels from label pool to regular prefixes in BGP labeled unicast 2018-12-20 15:28:52 +03:00
bgp_lcommunity.c Merge pull request #3869 from qlyoung/cocci-fixes 2019-03-06 15:54:44 +01:00
bgp_lcommunity.h bgpd: Code to handle BGP aggregate's l-communities. 2019-02-28 20:22:41 -08:00
bgp_mac.c bgpd: parse and comapre rmac attr against self mac 2019-03-04 09:56:05 -08:00
bgp_mac.h bgpd: parse and comapre rmac attr against self mac 2019-03-04 09:56:05 -08:00
bgp_main.c Merge branch 'master' into evpn-session-vrf 2019-03-28 18:41:38 +01:00
bgp_memory.c *: support for evpn type-4 route 2018-05-30 07:48:20 -04:00
bgp_memory.h *: support for evpn type-4 route 2018-05-30 07:48:20 -04:00
bgp_mpath.c *: compare pointer types to NULL, not 0 2019-02-25 23:00:46 +00:00
bgp_mpath.h bgpd: Rename various variable names to something more appropriate 2018-10-09 14:26:30 -04:00
bgp_mplsvpn.c Merge pull request #3931 from chiragshah6/evpn_dev1 2019-04-02 11:59:35 -04:00
bgp_mplsvpn.h Merge pull request #3931 from chiragshah6/evpn_dev1 2019-04-02 11:59:35 -04:00
bgp_network.c bgpd: add support for MD5 auth on listen ranges 2019-04-16 15:26:20 +00:00
bgp_network.h bgpd: add support for MD5 auth on listen ranges 2019-04-16 15:26:20 +00:00
bgp_nexthop.c *: Rename backet to bucket 2019-02-25 16:22:36 +00:00
bgp_nexthop.h bgpd: Convert struct bgp_info to struct bgp_path_info 2018-10-09 14:14:25 -04:00
bgp_nht.c *: do not register nexthop 0.0.0.0 to nht 2019-04-03 11:17:57 -07:00
bgp_nht.h bgpd: Late registration of Extended Nexthop should allow RA's to happen 2018-11-07 14:11:45 -05:00
bgp_open.c bgpd: capabilty 2019-02-27 18:09:08 +00:00
bgp_open.h bgpd: capabilty 2019-02-27 18:09:08 +00:00
bgp_packet.c bgpd: Modify End of Rib notification to INFO 2019-01-07 17:51:27 +01:00
bgp_packet.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
bgp_pbr.c bgpd: simplify lookup list call with fs pbr entries 2019-03-29 15:04:18 +01:00
bgp_pbr.h bgpd: display the list of iprules attached to a fs entry 2019-01-29 14:15:10 +01:00
bgp_rd.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_rd.h bgpd: Auto RD definitions and encoding 2018-04-25 12:39:16 -04:00
bgp_regex.c *: reindent 2017-07-17 14:04:07 +02:00
bgp_regex.h *: reindent 2017-07-17 14:04:07 +02:00
bgp_route.c bgpd: instance delete unimport evpn routes 2019-04-18 09:13:55 -07:00
bgp_route.h bgpd: Remove extra alloc function bgp_path_info_new 2019-04-06 20:10:52 -04:00
bgp_routemap.c Merge pull request #3909 from AnuradhaKaruppiah/l3-vni-0 2019-03-11 12:05:30 -07:00
bgp_rpki.c bgpd: Fix rpki command nodes. 2019-04-03 16:47:44 -04:00
bgp_snmp.c *: use array_size instead of raw division 2019-02-25 23:00:16 +00:00
bgp_table.c Merge pull request #3093 from donaldsharp/bgp_node_continued 2018-12-11 11:13:25 -05:00
bgp_table.h Merge pull request #3093 from donaldsharp/bgp_node_continued 2018-12-11 11:13:25 -05:00
bgp_updgrp_adv.c Merge pull request #3093 from donaldsharp/bgp_node_continued 2018-12-11 11:13:25 -05:00
bgp_updgrp_packet.c *: remove casts of XMALLOC / XCALLOC 2019-02-25 23:00:46 +00:00
bgp_updgrp.c *: remove null check before XFREE 2019-02-25 23:00:46 +00:00
bgp_updgrp.h bgpd: Re-use TX Addpath IDs where possible 2018-11-10 00:16:36 +00:00
bgp_vnc_types.h bgpd: Cleanup of bgp daemon code 2018-07-07 22:51:13 +02:00
bgp_vpn.c bgpd: Cleanup non-usage of prefix2str in bgp_vpn.c 2018-11-16 09:43:35 -05:00
bgp_vpn.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bgp_vty.c Merge pull request #3932 from nitinsoniism/bgp_gshut_clear_soft_in_out 2019-03-31 17:05:14 -04:00
bgp_vty.h bgpd, lib, vtysh, zebra: Convert to using CMD_VNI_RANGE 2018-10-31 06:23:32 -04:00
bgp_zebra.c Merge pull request #3762 from pguibert6WIND/do_not_alloc_lists_fs_by_def 2019-04-16 11:24:48 -04:00
bgp_zebra.h bgpd: move bgp_update_redist_vrf_bitmaps to bgp_zebra.c for wider use beyond bgp_vty 2019-03-14 15:05:38 +00:00
bgpd.c bgpd: add support for MD5 auth on listen ranges 2019-04-16 15:26:20 +00:00
bgpd.conf.sample Fix typos in BGPd sample configuration file 2018-12-27 09:13:55 +02:00
bgpd.conf.sample2 Initial revision 2002-12-13 20:15:29 +00:00
bgpd.conf.vnc.sample bgpd: hide "router bgp" commands also under "address-family ipv4 unicast" 2017-05-04 17:06:13 +00:00
bgpd.h Merge branch 'master' into evpn-session-vrf 2019-03-28 18:41:38 +01:00
IMPLEMENTATION.txt bgpd: Convert struct bgp_info to struct bgp_path_info 2018-10-09 14:14:25 -04:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am bgpd: vrl source-vrf route map filter 2019-02-19 07:24:19 -08:00
valgrind.supp bgpd: make valgrind suppression more generic 2019-02-19 22:00:34 +01:00