frr/bgpd
Donald Sharp 41c3eb672e bgpd: remove dmed check not required in bestpath selection
As part of the upstream master commit (f3575f61c7 bgpd: Sort the
bgp_path_inf) the snippet of the code for dmed check condition
left out, which leads to an issue of selecting incorrect bestpath.

As an example:

During the bestpath selection local route looses to another path due
to dmed condition being hit.

The snippet of the logs:

2025/02/20 03:06:20.131441 BGP: [JW7VP-K1YVV]
[2]:[0]:[48]:[00:92:00:00:00:10](VRF default): Comparing path
27.0.0.7 flags Valid  with path Static announcement flags Selected Valid Attr Changed Unsorted
2025/02/20 03:06:20.131445 BGP: [SYTDR-QV6X9] [2]:[0]:[48]:[00:92:00:00:00:10]: path 27.0.0.7 loses to path Static announcement as ES 03:44:38:39:ff:ff:02:00:00:01 is same and local
2025/02/20 03:06:20.131452 BGP: [JW7VP-K1YVV] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): Comparing path 27.0.0.8 flags Valid  with path Static announcement flags Selected Valid Attr Changed Unsorted
2025/02/20 03:06:20.131456 BGP: [SYTDR-QV6X9] [2]:[0]:[48]:[00:92:00:00:00:10]: path 27.0.0.8 loses to path Static announcement as ES 03:44:38:39:ff:ff:02:00:00:01 is same and local
2025/02/20 03:06:20.131458 BGP: [WEWEC-8SE72] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): path Static announcement is the bestpath from AS 0   <<<< static is best
2025/02/20 03:06:20.131463 BGP: [Z3A78-GM3G5] bgp_best_selection: [2]:[0]:[48]:[00:92:00:00:00:10](VRF default) pi 27.0.0.7 dmed
2025/02/20 03:06:20.131467 BGP: [Z3A78-GM3G5] bgp_best_selection: [2]:[0]:[48]:[00:92:00:00:00:10](VRF default) pi 27.0.0.8 dmed
2025/02/20 03:06:20.131471 BGP: [N6CTF-2RSKS] [2]:[0]:[48]:[00:92:00:00:00:10](VRF default): After path selection, newbest is path 27.0.0.7 oldbest was Static announce

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 83ad94694b)
2025-02-21 23:12:23 +00:00
..
rfapi bgpd: fix labels static-analyser 2024-08-26 10:29:12 +02:00
rfp-example *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
bgp_addpath.c Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:06:31 +02:00
bgp_addpath.h Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:06:31 +02:00
bgp_addpath_types.h bgpd: Implement neighbor X addpath-tx-best-selected command 2023-06-07 22:27:29 +03:00
bgp_advertise.c bgpd: fix labels in adj-rib-in 2024-06-05 13:11:29 +02:00
bgp_advertise.h bgpd: fix label in adj-rib-out 2024-06-05 13:11:29 +02:00
bgp_aspath.c bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-05-16 17:49:42 +02:00
bgp_aspath.h bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-05-16 17:49:42 +02:00
bgp_attr.c bgpd: fix AIGP calculation in route advertisement 2024-10-22 05:40:50 +00:00
bgp_attr.h bgpd: use igpmetric in bgp_aigp_metric_total() 2025-01-10 14:27:45 +00:00
bgp_attr_evpn.c bgpd: changes for code maintainability 2024-09-18 11:24:19 +05:30
bgp_attr_evpn.h bgpd: Move evpn_overlay to a pointer 2024-08-11 13:59:13 +03:00
bgp_bfd.c bgpd: Reset BGP session only if it was a real BFD DOWN event 2025-02-10 11:41:11 +02:00
bgp_bfd.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_bmp.c bgpd: Fix memory leak when creating BMP connection with a source interface 2024-12-19 21:56:11 +00:00
bgp_bmp.h bgpd: add 'bmp stat send-experimental' command 2024-04-26 08:12:38 +02:00
bgp_btoa.c bgpd: changes for code maintainability 2024-09-18 11:24:19 +05:30
bgp_clist.c bgpd: Treat numbered community-list only if it's in a range 1-500 2024-11-05 15:17:25 +00:00
bgp_clist.h bgpd: Treat numbered community-list only if it's in a range 1-500 2024-11-05 15:17:25 +00:00
bgp_community.c bgpd: changes for code maintainability 2024-09-10 10:37:04 +05:30
bgp_community.h bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_community_alias.c *: Add a hash_clean_and_free() function 2023-03-21 08:54:21 -04:00
bgp_community_alias.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_conditional_adv.c bgpd: Ensure community data is freed in some cases. 2024-03-13 19:28:11 -04:00
bgp_conditional_adv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_damp.c bgpd: VRF-Lite fix default bgp delete 2024-09-18 18:03:10 +03:00
bgp_damp.h bgpd: Pass the right reuse_list when handling it via bgp_reuse_timer thread 2024-05-03 09:30:33 +03:00
bgp_debug.c bgpd: changes for code maintainability 2024-09-10 10:37:04 +05:30
bgp_debug.h bgpd: store number of labels with 8 bits 2024-06-05 13:11:29 +02:00
bgp_dump.c *: remove sys/stat.h from zebra.h 2024-01-09 12:39:23 -05:00
bgp_dump.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_ecommunity.c bgpd: changes for code maintainability 2024-09-12 11:17:46 +05:30
bgp_ecommunity.h bgpd: define val in ecommunity_val as uint8_t 2024-09-18 12:28:03 -07:00
bgp_encap_tlv.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_encap_tlv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_encap_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_errors.c Revert "bgpd: store bgp link-state prefixes" 2023-10-10 16:45:00 -04:00
bgp_errors.h Revert "bgpd: store bgp link-state prefixes" 2023-10-10 16:45:00 -04:00
bgp_evpn.c bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers 2024-11-16 10:53:01 +00:00
bgp_evpn.h bgpd : backpressure - Fix to pop items off zebra_announce FIFO for few EVPN triggers 2024-11-16 10:53:01 +00:00
bgp_evpn_mh.c bgpd: fix bgp label evpn CID 1636504 2025-02-12 14:37:58 +00:00
bgp_evpn_mh.h bgpd: fix evpn mh esi flap remove local routes 2024-10-15 05:21:51 +00:00
bgp_evpn_private.h bgpd: Move sticky, default_gw, router_flag into a single flags variable 2024-07-04 09:47:07 +03:00
bgp_evpn_vty.c bgpd: fix vty output of evpn route-target AS4 2025-02-15 20:11:59 +00:00
bgp_evpn_vty.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_filter.c bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-05-16 17:49:42 +02:00
bgp_filter.h bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-05-16 17:49:42 +02:00
bgp_flowspec.c bgpd: Move evpn_overlay to a pointer 2024-08-11 13:59:13 +03:00
bgp_flowspec.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_flowspec_private.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_util.c bgpd: changes for code maintainability 2024-09-26 14:53:54 +05:30
bgp_flowspec_util.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_vty.c bgpd: fix use single whitespace when displaying flowspec entries 2024-11-26 18:12:38 +00:00
bgp_fsm.c bgpd: Do not start BGP session if BGP identifier is not set 2025-02-04 23:31:11 +02:00
bgp_fsm.h bgpd: Fix wrong pthread event cancelling 2025-01-24 13:24:40 -05:00
bgp_io.c bgpd: bgp_fsm_change_status/BGP_TIMER_ON and BGP_EVENT_ADD 2023-09-10 08:31:25 -04:00
bgp_io.h bgpd: Convert bgp_io.c to take struct peer_connection 2023-08-18 09:29:04 -04:00
bgp_keepalives.c bgpd: make bgp_keepalives_on|off connection oriented 2023-09-10 08:31:25 -04:00
bgp_keepalives.h bgpd: make bgp_keepalives_on|off connection oriented 2023-09-10 08:31:25 -04:00
bgp_label.c bgpd: Fix crash in bgp_labelpool 2025-02-13 17:45:18 +00:00
bgp_label.h bgpd: move labels from extra to extra->labels 2024-06-05 13:11:29 +02:00
bgp_labelpool.c bgpd: Fix crash in bgp_labelpool 2025-02-13 17:45:18 +00:00
bgp_labelpool.h bgpd: Fix crash in bgp_labelpool 2025-02-13 17:45:18 +00:00
bgp_lcommunity.c bgpd: Fix lcom->str string length to correctly cover aliases 2023-04-20 16:51:56 -04:00
bgp_lcommunity.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mac.c bgpd: fix labels static-analyser 2024-08-26 10:29:12 +02:00
bgp_mac.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_main.c bgpd: Do not ignore auto generated VRF instances when deleting 2025-02-02 20:58:01 +02:00
bgp_memory.c bgpd: Move evpn_overlay to a pointer 2024-08-11 13:59:13 +03:00
bgp_memory.h bgpd: Move evpn_overlay to a pointer 2024-08-11 13:59:13 +03:00
bgp_mpath.c bgpd: Print debug message about reaching maximum allowed multi paths 2024-10-03 09:20:40 +03:00
bgp_mpath.h bgpd: Remove unused bgp_mp_dmed_deselect function 2024-10-02 10:55:32 -04:00
bgp_mplsvpn.c bgpd: Fix crash in bgp_labelpool 2025-02-13 17:45:18 +00:00
bgp_mplsvpn.h bgpd: Respect allowas-in value from the source VRF's peer 2025-01-14 15:20:42 +00:00
bgp_mplsvpn_snmp.c bgpd, doc: add bgp snmp traps rfc4382 command 2024-08-11 19:28:50 +00:00
bgp_mplsvpn_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_network.c bgpd: Do not start BGP session if BGP identifier is not set 2025-02-04 23:31:11 +02:00
bgp_network.h bgpd: fix 'nexthop_set failed' error message often displayed 2024-09-12 16:14:27 +02:00
bgp_nexthop.c bgpd: Allow bfd to work if peer known but interface address not yet 2025-02-10 09:42:21 +02:00
bgp_nexthop.h *: Allow 16 bit size for nexthops 2024-10-08 09:26:57 -04:00
bgp_nhg.c bgpd: move l3nhg functions in separate bgp_nhg.[ch] file 2023-12-11 21:03:33 +01:00
bgp_nhg.h bgpd: move l3nhg functions in separate bgp_nhg.[ch] file 2023-12-11 21:03:33 +01:00
bgp_nht.c bgpd: add bgp ipv6-auto-ra command 2024-10-28 12:30:10 +00:00
bgp_nht.h bgpd: move l3nhg functions in separate bgp_nhg.[ch] file 2023-12-11 21:03:33 +01:00
bgp_open.c bgpd: Print errors as error not as information when parsing OPEN message 2024-09-01 22:42:54 +03:00
bgp_open.h bgpd: Add sanity check for capability lengths before processing them 2024-05-24 10:35:42 +03:00
bgp_packet.c bgpd: When removing the prefix list drop the pointer 2025-02-14 21:29:13 +00:00
bgp_packet.h bgpd: First pass of BGP_EVENT_ADD 2023-09-10 08:31:25 -04:00
bgp_pbr.c bgpd: don't reuse nexthop variable in loop/switch 2025-02-11 08:43:50 +00:00
bgp_pbr.h *: Let's use the native IFNAMSIZ instead of INTERFACE_NAMSIZ 2023-11-21 08:08:29 -05:00
bgp_rd.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_rd.h bgpd: Optimize memory for rd_ip struct 2024-01-31 11:29:30 +02:00
bgp_regex.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_regex.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_route.c bgpd: remove dmed check not required in bestpath selection 2025-02-21 23:12:23 +00:00
bgp_route.h Revert "bgpd: Reinstall aggregated routes if using route-maps and it was changed" 2025-01-10 09:49:04 +02:00
bgp_routemap.c Revert "bgpd: Reinstall aggregated routes if using route-maps and it was changed" 2025-01-10 09:49:04 +02:00
bgp_routemap_nb.c bgpd, yang: fix missing mandatory/default statements on some leafs 2024-02-26 01:03:27 +02:00
bgp_routemap_nb.h bgpd, yang: fix missing mandatory/default statements on some leafs 2024-02-26 01:03:27 +02:00
bgp_routemap_nb_config.c bgpd: Implement draft-li-idr-link-bandwidth-ext-01 2024-04-22 17:50:08 +03:00
bgp_rpki.c bgpd: Validate only affected RPKI prefixes instead of a full RIB 2024-12-20 15:06:24 +00:00
bgp_rpki.h bgpd: create cache server socket in vrf 2024-01-18 13:22:19 +01:00
bgp_script.c bgpd: Convert struct peer_connection to dynamically allocated 2023-08-18 09:29:04 -04:00
bgp_script.h bgpd: remove bgpd.h from bgp script header 2024-09-17 08:26:04 -04:00
bgp_snmp.c bgpd, doc: add bgp snmp traps rfc4382 command 2024-08-11 19:28:50 +00:00
bgp_snmp.h bgpd: add [no] bgp snmp traps bgp4-mibv2 command 2023-10-24 17:16:47 +02:00
bgp_snmp_bgp4.c Revert "bgpd: fix pointer arithmetic in bgp snmp module" 2024-04-23 11:39:29 +02:00
bgp_snmp_bgp4.h bgpd: add snmp traps for bgp4-mibv2 2023-10-24 17:16:47 +02:00
bgp_snmp_bgp4v2.c bgpd: fix crash when polling bgp4v2PathAttrTable 2024-10-29 12:12:51 +00:00
bgp_snmp_bgp4v2.h bgpd: add snmp traps for bgp4-mibv2 2023-10-24 17:16:47 +02:00
bgp_table.c bgpd: When using dev build add pointer information to %pBD 2024-03-14 09:45:09 +00:00
bgp_table.h bgpd : backpressure - Handle BGP-Zebra(EPVN) Install evt Creation 2024-04-08 10:51:43 -07:00
bgp_trace.c *: Add missing SPDX-License-Identifier for some .c/.h files 2024-03-21 16:46:58 +02:00
bgp_trace.h bgpd: lttng tp add ethtag to macip zebra send 2023-12-27 18:01:50 -08:00
bgp_updgrp.c bgpd: Fix bgp peer solo option 2025-01-24 06:51:35 +00:00
bgp_updgrp.h bgpd: Drop periodic merge check functions 2024-03-20 16:44:13 +02:00
bgp_updgrp_adv.c bgpd: fix label in adj-rib-out 2024-06-05 13:11:29 +02:00
bgp_updgrp_packet.c bgpd: fix AIGP calculation in route advertisement 2024-10-22 05:40:50 +00:00
bgp_vnc_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vpn.c bgpd: Fix display when using missing-as-worst 2024-04-15 12:33:53 -04:00
bgp_vpn.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vty.c bgpd: fix route-distinguisher in vrf leak json cmd 2025-02-04 12:41:05 +00:00
bgp_vty.h bgpd: Convert int to enum peer_asn_type 2024-07-04 23:07:01 +03:00
bgp_zebra.c Merge pull request #18076 from opensourcerouting/fix/bfd_backports_10.2 2025-02-12 12:58:15 -05:00
bgp_zebra.h bgpd: Add API to get/release SRv6 SIDs 2024-09-05 10:59:59 +02:00
bgpd.c Revert "bgpd: release manual vpn label on instance deletion (backport #18121)" 2025-02-19 11:22:03 -05:00
bgpd.h bgpd: Do not start BGP session if BGP identifier is not set 2025-02-04 23:31:11 +02:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am bgpd: move l3nhg functions in separate bgp_nhg.[ch] file 2023-12-11 21:03:33 +01:00