mirror_frr/bgpd
Philippe Guibert 7817cdeadc bgpd: fix accept-own routes received by a route reflector
When using the bgp-accept-own community, with the
'attribute-unchanged next-hop' command, the advertised
mpls vpn updates that are reflected by a route reflector
are received, but are not selected.

Once the accept-own community is detected, a new bgp_path
is created, in addition of the original one; then the
next-hop of the NLRI is checked, but fails for two reasons:
- the next-hop tracking returns the real IP reachability
status for prefixes that have the BGP_ROUTE_IMPORTED subtype.
This is what happens with bgp updates with the accept-own
community.
- as the next-hop was unchanged and was the peer IP in the VRF.
Consequently, the new bgp_path is considered inactive in the
default VRF, and is not selected.

The incoming bgp updates with the accept-own community should
not be checked against the next-hop tracking. As the bgp_path
subtype has been changed to BGP_ROUTE_IMPORTED, let us check
the bgp subtype before calling the 'bgp_find_or_add_nexthop()'
function in the 'bgp_update()' call.

Fixes: 46dbf9d0c0 bgpd: ("Implement ACCEPT_OWN extended community")
Fixes: 376797711f4d - bgpd: track mpls vpn nexthops
Fixes: e6110f755718 bgpd: ("fix use nexthop tracking for exported vpn paths")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-06-16 10:55:17 +02:00
..
rfapi bgpd: Initialize pfx_buf to zeros before using in bgp_path_info_cmp() 2023-05-20 10:03:10 +03: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_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_addpath.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_addpath.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_advertise.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_advertise.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_aspath.c *: Add a hash_clean_and_free() function 2023-03-21 08:54:21 -04:00
bgp_aspath.h Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_attr_evpn.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_attr_evpn.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_attr.c bgpd: fix bgpd core when unintern attr 2023-05-30 22:49:07 +00:00
bgp_attr.h Merge pull request #12780 from opensourcerouting/spdx-license-id 2023-02-17 09:43:05 -05:00
bgp_bfd.c doc: Add missing rfc9384 to BGP supported RFC list 2023-04-01 21:56:37 +03:00
bgp_bfd.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_bmp.c bgpd: bmp fix peer-up ports byte order 2023-04-03 17:19:32 +02:00
bgp_bmp.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_btoa.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_clist.c bgpd: entry->any is never true 2023-06-05 07:57:49 -04:00
bgp_clist.h bgpd: entry->any is never true 2023-06-05 07:57:49 -04: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_community.c *: Add a hash_clean_and_free() function 2023-03-21 08:54:21 -04:00
bgp_community.h bgpd: Deprecate BGP internet community 2023-02-17 18:53:01 +02:00
bgp_conditional_adv.c *: Convert THREAD_XXX macros to EVENT_XXX macros 2023-03-24 08:32:17 -04:00
bgp_conditional_adv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_damp.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_damp.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_debug.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_debug.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_dump.c bgpd: increase buffer size used for dumping BGP to MRT files 2023-03-30 14:23:48 +01:00
bgp_dump.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_ecommunity.c bgpd: fix show running of nt extcommunity 2023-05-05 17:50:36 +02:00
bgp_ecommunity.h bgpd: Reuse encode_route_target_ip() function 2023-04-14 22:33:34 +03: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 *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_errors.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_evpn_mh.c bgpd:add correct value into dfAlgorithm json output 2023-04-16 10:29:09 -07:00
bgp_evpn_mh.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_evpn_private.h bgpd: Drop afi_t from bgp_evpn_global_node_lookup() 2023-03-14 12:05:58 +02:00
bgp_evpn_vty.c bgpd: Using no pretty json output for l2vpn-Evpn routes 2023-05-22 14:14:30 -07:00
bgp_evpn_vty.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_evpn.c Merge pull request #13310 from opensourcerouting/feature/bgpd_node_target_extended_community 2023-04-25 11:06:23 -04:00
bgp_evpn.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_filter.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_filter.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_private.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_util.c bgpd: add some flowspec sanity returns 2023-04-28 22:28:16 +02:00
bgp_flowspec_util.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec_vty.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_flowspec.c bgpd: Free temp memory 2023-05-29 13:39:14 +04:00
bgp_flowspec.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_fsm.c bgpd: Use enum bgp_fsm_state_progress for bgp_stop() 2023-06-13 16:01:40 +03:00
bgp_fsm.h bgpd: Use enum bgp_fsm_state_progress for bgp_stop() 2023-06-13 16:01:40 +03:00
bgp_io.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_io.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_keepalives.c *: Convert THREAD_XXX macros to EVENT_XXX macros 2023-03-24 08:32:17 -04:00
bgp_keepalives.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_label.c bgpd: add a function to compare two label lists 2023-06-16 10:54:58 +02:00
bgp_label.h bgpd: add a function to compare two label lists 2023-06-16 10:54:58 +02:00
bgp_labelpool.c bgpd: update the mpls entry to handle return traffic 2023-06-16 10:54:58 +02:00
bgp_labelpool.h bgpd: add LP_TYPE_BGP_L3VPN_BIND label type 2023-06-16 10:54:58 +02: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: Cosmetic change for mac check 2023-05-10 16:58:29 +08:00
bgp_mac.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_main.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_memory.c Merge pull request #12780 from opensourcerouting/spdx-license-id 2023-02-17 09:43:05 -05:00
bgp_memory.h Merge pull request #12780 from opensourcerouting/spdx-license-id 2023-02-17 09:43:05 -05:00
bgp_mpath.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mpath.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn_snmp.c bgpd: Coverity mistakenly believes we can fall through 2023-04-21 07:57:19 -04:00
bgp_mplsvpn_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn.c bgpd: add 'show bgp mplsvpn-nh-label-bind' command 2023-06-16 10:54:58 +02:00
bgp_mplsvpn.h bgpd: add 'show bgp mplsvpn-nh-label-bind' command 2023-06-16 10:54:58 +02:00
bgp_network.c bgpd: Add some color to why nexthop_set failed 2023-06-12 09:22:51 -04:00
bgp_network.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_nexthop.c bgpd: allocate label bound to received mpls vpn routes 2023-06-16 10:54:58 +02:00
bgp_nexthop.h Revert "bgpd: upon if up event, evaluate bnc with matching nexthop" 2023-06-08 23:17:53 -04:00
bgp_nht.c bgpd: fix use nexthop tracking for exported vpn paths 2023-06-16 10:55:17 +02:00
bgp_nht.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_open.c Merge pull request #12953 from donaldsharp/struct_event 2023-03-24 13:48:53 -05:00
bgp_open.h Merge pull request #12780 from opensourcerouting/spdx-license-id 2023-02-17 09:43:05 -05:00
bgp_packet.c bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_packet.h bgpd: Treat withdraw variable as a bool 2023-04-06 17:41:32 -04:00
bgp_pbr.c *: Add a hash_clean_and_free() function 2023-03-21 08:54:21 -04:00
bgp_pbr.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_rd.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_rd.h Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05: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: fix accept-own routes received by a route reflector 2023-06-16 10:55:17 +02:00
bgp_route.h bgpd: advertise mpls vpn routes with appropriate label 2023-06-16 10:54:58 +02:00
bgp_routemap_nb_config.c bgpd: Implement match source-protocol for route-maps 2023-05-11 11:39:23 +03:00
bgp_routemap_nb.c bgpd: Implement match source-protocol for route-maps 2023-05-11 11:39:23 +03:00
bgp_routemap_nb.h bgpd: Implement match source-protocol for route-maps 2023-05-11 11:39:23 +03:00
bgp_routemap.c bgpd: Implement match source-protocol for route-maps 2023-05-11 11:39:23 +03:00
bgp_rpki.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_rpki.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_script.c Merge pull request #12248 from pguibert6WIND/bgpasdot 2023-02-21 08:01:03 -05:00
bgp_script.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_snmp_bgp4.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4v2.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp_bgp4v2.h *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
bgp_snmp.c *: Convert event.h to frrevent.h 2023-03-24 08:32:17 -04:00
bgp_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_table.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_table.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_trace.c *: make sure config.h or zebra.h is first 2021-04-23 12:06:35 +02:00
bgp_trace.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_updgrp_adv.c bgpd: Refactor subgroup_announce_table() to reuse an existing helpers 2023-05-25 17:04:47 +03:00
bgp_updgrp_packet.c bgpd: advertise mpls vpn routes with appropriate label 2023-06-16 10:54:58 +02:00
bgp_updgrp.c bgpd: Remove bgp_lock() when spawning a timer for default-originate 2023-05-31 22:49:32 +03:00
bgp_updgrp.h *: Rename struct thread to struct event 2023-03-24 08:32:17 -04:00
bgp_vnc_types.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vpn.c *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vpn.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_vty.c bgpd: add 'mpls bgp l3vpn-multi-domain-switching' command 2023-06-16 10:54:58 +02:00
bgp_vty.h bgpd: Use enum bgp_create_error_code as argument in header 2023-06-13 16:08:24 +03:00
bgp_zebra.c bgpd: update the mpls entry to handle return traffic 2023-06-16 10:54:58 +02:00
bgp_zebra.h bgpd: update the mpls entry to handle return traffic 2023-06-16 10:54:58 +02:00
bgpd.c bgpd: add 'show bgp mplsvpn-nh-label-bind' command 2023-06-16 10:54:58 +02:00
bgpd.h bgpd: add mpls vpn nh label bind cache struct and apis 2023-06-16 10:54:58 +02:00
Makefile build: non-recursive bgpd & rfp 2018-09-08 21:25:59 +02:00
subdir.am Revert "bgpd: optimal router reflection cli and fsm changes" 2023-01-17 18:15:28 +02:00