frr/bgpd
Donald Sharp 9f002fa5dd bgpd: Fix import check removal
Fix: 06e4e90132

Modified BGP to pay more attention the prefix returned from
zebra to ensure that a LPM wasn't accidently causing BGP
import checks to think it had a match when it did not.
This unfortunately removed the check to handle the route
removal.

This sequence of config and events would leave BGP in a bad state:
ip route 100.100.100.0/24 Null0
router bgp 32932
  bgp network import-check
  address-family ipv4 uni
    network 100.100.100.0/24

Then if you removed the static route the import check would
still think the route existed:

donatas-pc(config)# ip route 100.100.100.0/24 Null0

donatas-pc(config)# do sh ip bgp import-check-table
Current BGP import check cache:
 100.100.100.0 valid [IGP metric 0], #paths 1
  blackhole
  Last update: Sat Apr 23 22:51:34 2022

donatas-pc(config)# do sh ip nht
100.100.100.0
 resolved via static
 is directly connected, Null0
 Client list: bgp(fd 17)

donatas-pc(config)# do sh ip bgp neighbors 192.168.10.123 advertised-routes | include 100.100.100.0
*> 100.100.100.0/24 0.0.0.0                  0         32768 i

donatas-pc(config)# no ip route 100.100.100.0/24 Null0

donatas-pc(config)# do sh ip nht
100.100.100.0
 resolved via kernel
 via 192.168.10.1, enp3s0
 Client list: bgp(fd 17)

donatas-pc(config)# do sh ip bgp import-check-table
Current BGP import check cache:
 100.100.100.0 valid [IGP metric 0], #paths 1
  blackhole
  Last update: Sat Apr 23 22:51:34 2022

donatas-pc(config)# do sh ip bgp neighbors 192.168.10.123 advertised-routes | include 100.100.100.0
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
donatas-pc(config)#

Fix this by moving the code to handle the prefix check to the
evaluation function and mark the bnc as not matching and actually
evaluate the bnc.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-24 17:08:12 -04:00
..
rfapi bgpd: Reuse bgp_attr_set_ecommunity() for setting attribute flags 2022-04-12 22:09:28 +03:00
rfp-example build: properly split CFLAGS from AC_CFLAGS 2021-04-21 15:42:36 +02:00
.gitignore
bgp_addpath.c bgpd, lib, staticd, tests: Convert to using FOREACH_AFI_SAFI 2020-11-14 18:53:03 -05:00
bgp_addpath.h
bgp_addpath_types.h
bgp_advertise.c bgpd: Convert bgp_addpath_encode_[tr]x() to bool from int 2022-02-01 13:31:16 +02:00
bgp_advertise.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
bgp_aspath.c *: Fix spelling of seperator 2022-04-19 08:15:23 -04:00
bgp_aspath.h bgpd: Replace 65535 with UINT16_MAX 2021-02-02 15:31:12 +02:00
bgp_attr.c *: Fix spelling of strucutre 2022-04-19 08:19:37 -04:00
bgp_attr.h Merge pull request #11010 from opensourcerouting/feature/reuse_bgp_attr_set_community_for_flags 2022-04-13 14:54:30 -04:00
bgp_attr_evpn.c bgpd: fix null pointer dereferences 2022-02-10 00:14:39 +03:00
bgp_attr_evpn.h bgpd: Fixing memcmp to avoid coverity issue 2022-01-31 21:50:50 -08:00
bgp_bfd.c bgpd: fix source-address for BFD sessions when using update-source IFNAME 2021-11-12 19:32:06 +03:00
bgp_bfd.h bgpd: improve BFD with timers configuration 2021-03-23 12:40:11 -03:00
bgp_bmp.c bgpd: Add autocomplete for BMP targets 2022-03-26 18:41:54 +02:00
bgp_bmp.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
bgp_btoa.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_clist.c bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_clist.h bgpd: Auto-complete for community lists 2021-08-10 10:56:26 +03:00
bgp_community.c bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_community.h bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_community_alias.c build: first header *must* be zebra.h or config.h 2022-04-04 18:33:10 +02:00
bgp_community_alias.h bgpd: fix memory leaks in bgp_alias2community_str 2021-08-11 12:09:15 +03:00
bgp_conditional_adv.c *: Fix spelling of atleast 2022-04-19 08:25:03 -04:00
bgp_conditional_adv.h bgpd: add knob to config cond-adv scanner period 2021-07-13 13:19:14 -04:00
bgp_damp.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_damp.h Revert "bgpd: peer / peer group dampening profiles" 2021-08-03 21:54:47 +03:00
bgp_debug.c bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_debug.h bgpd: Generate and advertise gateway IP overlay index with EVPN RT-5 2021-06-07 17:58:22 -07:00
bgp_dump.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_dump.h bgpd: Add Support for rfc 8050 MRT add-path 2021-02-11 16:51:41 -08:00
bgp_ecommunity.c *: Fix spelling of strucutre 2022-04-19 08:19:37 -04:00
bgp_ecommunity.h bgpd: Add neighbor PEER link-bw-encoding-ieee 2021-08-30 14:21:49 +03:00
bgp_encap_tlv.c *: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN 2021-07-01 23:54:39 +03:00
bgp_encap_tlv.h
bgp_encap_types.h
bgp_errors.c bgpd: Warn user when an interface has no v6 LL address associated with it 2022-03-07 08:00:26 -05:00
bgp_errors.h bgpd: Warn user when an interface has no v6 LL address associated with it 2022-03-07 08:00:26 -05:00
bgp_evpn.c Merge pull request #11012 from anlancs/bgpd-mh-simplify-condition 2022-04-19 13:04:43 +03:00
bgp_evpn.h bgpd: Convert bgp_addpath_encode_[tr]x() to bool from int 2022-02-01 13:31:16 +02:00
bgp_evpn_mh.c Merge pull request #11012 from anlancs/bgpd-mh-simplify-condition 2022-04-19 13:04:43 +03:00
bgp_evpn_mh.h Merge pull request #11012 from anlancs/bgpd-mh-simplify-condition 2022-04-19 13:04:43 +03:00
bgp_evpn_private.h bgpd: remove dead code for evpn 2022-03-26 19:48:52 +08:00
bgp_evpn_vty.c Merge pull request #11024 from anlancs/bgpd-fix-missing-newline 2022-04-13 14:56:00 -04:00
bgp_evpn_vty.h bgpd: CLI to advertise gateway IP overlay index 2021-06-07 17:58:22 -07:00
bgp_filter.c *: Remove redundand braces for single statement blocks 2021-11-27 11:20:59 +02:00
bgp_filter.h bgpd: add seqno in bgp as-path access-list policy 2021-03-17 22:06:53 -07:00
bgp_flowspec.c bgpd: Use bgp_attr_[sg]et_ecommunity for struct ecommunity 2022-02-04 15:56:20 +02:00
bgp_flowspec.h bgpd: flowspec code support for ipv6 2020-08-21 13:37:08 +02:00
bgp_flowspec_private.h bgpd, lib: support for flow_label flowspec type 2020-08-21 13:37:08 +02:00
bgp_flowspec_util.c *: unify prefix copying 2021-06-29 16:11:47 +03:00
bgp_flowspec_util.h bgpd: ipv6 flowspec address decoding and validation 2020-08-21 13:37:08 +02:00
bgp_flowspec_vty.c bgpd: Use bgp_attr_[sg]et_ecommunity for struct ecommunity 2022-02-04 15:56:20 +02:00
bgp_fsm.c bgpd: Use proper debug msg for graceful restart commands 2022-04-05 13:57:35 +03:00
bgp_fsm.h *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_io.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_io.h
bgp_keepalives.c
bgp_keepalives.h
bgp_label.c bgpd: Add %pBP printfrr() extension to print IP(hostname) for BGP peer 2022-03-31 21:20:11 +03:00
bgp_label.h bgpd: add some const 2021-10-01 07:48:45 -04:00
bgp_labelpool.c *: Add camelCase JSON keys in addition to PascalCase 2022-02-03 10:48:06 +02:00
bgp_labelpool.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
bgp_lcommunity.c *: Fix spelling of strucutre 2022-04-19 08:19:37 -04:00
bgp_lcommunity.h bgpd: Allow setting BGP [large]community in route-maps 2022-04-09 17:34:06 +03:00
bgp_mac.c bgpd: Generate and advertise gateway IP overlay index with EVPN RT-5 2021-06-07 17:58:22 -07:00
bgp_mac.h
bgp_main.c *: rework renaming the default VRF 2021-12-21 22:09:29 +03:00
bgp_memory.c lib, bgpd: changes for EAD-per-ES fragmentation 2022-03-18 07:37:06 -04:00
bgp_memory.h lib, bgpd: changes for EAD-per-ES fragmentation 2022-03-18 07:37:06 -04:00
bgp_mpath.c bgpd: Fix styling, drop braces for single statement block 2022-04-12 22:12:16 +03:00
bgp_mpath.h bgpd: Add vrf information to best path debugging 2021-11-12 13:24:04 -05:00
bgp_mplsvpn.c bgpd: take SRv6 locator's prefix length into account when generating SIDs 2022-04-14 14:37:55 +09:00
bgp_mplsvpn.h bgpd: Convert vpn_policy_direction_t to enum 2022-04-12 22:13:55 +03:00
bgp_mplsvpn_snmp.c build: make builddir include path consistent 2021-04-21 15:42:33 +02:00
bgp_mplsvpn_snmp.h bgpd: implement mplsL3VpnVrfRtTable 2021-02-02 09:37:13 +00:00
bgp_network.c *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_network.h bgpd: Relax peer to be on the same host 2022-01-17 18:44:57 +02:00
bgp_nexthop.c bgpd: EVPN route type-5 to type-2 recursive resolution using gateway IP 2021-06-07 17:59:45 -07:00
bgp_nexthop.h bgpd: EVPN route type-5 to type-2 recursive resolution using gateway IP 2021-06-07 17:59:45 -07:00
bgp_nht.c bgpd: Fix import check removal 2022-04-24 17:08:12 -04:00
bgp_nht.h bgpd: prevent routes loop through itself 2021-07-12 13:57:36 +02:00
bgp_open.c bgpd: Implement LLGR helper mode 2021-12-28 16:07:59 +02:00
bgp_open.h bgpd: Implement rfc9072 2021-11-22 15:34:46 +02:00
bgp_packet.c bgpd: Convert bgp_attr_parse_ret_t to enum 2022-04-12 22:13:55 +03:00
bgp_packet.h *: Change thread->func to return void instead of int 2022-02-23 19:56:04 -05:00
bgp_pbr.c Merge pull request #10531 from idryzhov/bgp-nexthop-cmp 2022-02-08 14:40:03 -05:00
bgp_pbr.h bgpd: fallback proto icmp/v6 to appropriate l3 filter 2020-08-21 13:37:08 +02:00
bgp_rd.c bgpd: Convert inet_ntoa to %pI4/inet_ntop 2020-10-18 11:22:30 +03:00
bgp_rd.h bgpd: support for Ethernet Segments and Type-1/EAD routes 2020-08-05 06:46:12 -07:00
bgp_regex.c
bgp_regex.h
bgp_route.c *: Fix spelling of strucutre 2022-04-19 08:19:37 -04:00
bgp_route.h bgpd: change the treatment for SRv6 routes 2022-02-25 15:34:28 +00:00
bgp_routemap.c Merge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_rmap_change_peer_groups 2022-04-13 15:00:14 -04:00
bgp_routemap_nb.c bgpd: Add an ability to set extcommunity to none in route-maps 2021-08-18 14:14:52 +03:00
bgp_routemap_nb.h bgpd: Add an ability to set extcommunity to none in route-maps 2021-08-18 14:14:52 +03:00
bgp_routemap_nb_config.c bgpd, lib: fix inconsistency of match ip/ipv6 next-hop commands 2021-11-19 21:11:52 +03:00
bgp_rpki.c bgpd: Delay returning RPKI instance as running 2022-04-06 10:35:37 +03:00
bgp_rpki.h bgpd: Convert RPKI states to an enum and use them 2021-03-26 08:23:33 -04:00
bgp_script.c bgpd: Make sure we pop the table from the stack when decoding struct attr 2022-03-29 17:47:28 +03:00
bgp_script.h bgpd: Update bgp_script encoders and decoders 2021-06-22 05:03:07 +08:00
bgp_snmp.c bgpd: Fix misleading comments for some parts 2021-08-05 16:29:52 +03:00
bgp_table.c *: use semicolon after printfrr_ext_autoreg_{p,d} 2022-01-14 13:33:57 +01:00
bgp_table.h bgpd: Make sure bgp_dest lock/unlock tracepoints works for LTTng as well 2021-09-23 20:00:54 +03:00
bgp_trace.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
bgp_trace.h bgpd: lttng tracepoint for local events received from zebra 2021-10-15 10:37:02 -07:00
bgp_updgrp.c bgpd: Convert bgp_policy_type_e to enum 2022-04-12 22:13:55 +03:00
bgp_updgrp.h bgpd: Apply frrbot styling 2022-04-12 22:15:17 +03:00
bgp_updgrp_adv.c bgpd: Metric not set with default route. 2022-04-12 19:55:54 -07:00
bgp_updgrp_packet.c bgpd: Convert bpacket_attr_vec_type to enum 2022-04-12 22:13:55 +03:00
bgp_vnc_types.h
bgp_vpn.c bgpd: Convert vty_out to vty_json for JSON 2021-11-25 17:51:12 +02:00
bgp_vpn.h
bgp_vty.c Merge pull request #11013 from opensourcerouting/fix/convert_bgp_peer_sort_t_to_enum 2022-04-13 14:52:58 -04:00
bgp_vty.h bgpd: Add BGP configuration start/end markers 2022-03-22 09:04:46 +02:00
bgp_zebra.c bgpd: refactor type of srv6_locator_chunks list 2022-04-06 13:40:14 +09:00
bgp_zebra.h bgpd: Few code optimisations 2021-11-19 07:33:22 +05:30
bgpd.c Merge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_rmap_change_peer_groups 2022-04-13 15:00:14 -04:00
bgpd.conf.sample2
bgpd.h bgpd: Convert vpn_policy_direction_t to enum 2022-04-12 22:13:55 +03:00
IMPLEMENTATION.txt
Makefile
subdir.am Revert "bgpd: bgp northbound callbacks prototypes" 2021-08-03 23:36:31 +03:00