mirror_frr/bgpd
David Lamparter c0e7fac1f5 bgpd: don't reuse nexthop variable in loop/switch
While the loop is currently exited in all cases after using nexthop, it
is a footgun to have "nh" around to be reused in another iteration of
the loop.  This would leave nexthop with partial data from the previous
use.  Make it local where needed instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit ce7f5b2122)
2025-02-11 09:47:15 +01:00
..
rfapi bgpd: fix displaying srv6 sid 2024-02-06 11:21:21 +01:00
rfp-example *: Convert struct event_master to struct event_loop 2023-03-24 08:32:17 -04:00
.gitignore
bgp_addpath_types.h bgpd: Implement neighbor X addpath-tx-best-selected command 2023-06-07 22:27:29 +03:00
bgp_addpath.c Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:23:37 +02:00
bgp_addpath.h Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:23:37 +02:00
bgp_advertise.c bgpd: fix attr comparaison bgp_adj_in_set 2024-01-30 15:24:32 +01:00
bgp_advertise.h bgpd: Optimize memory for bgp_adj_out struct 2024-02-09 17:18:22 +02:00
bgp_aspath.c bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-06-24 21:09:28 +00:00
bgp_aspath.h bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-06-24 21:09:28 +00: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 route selection with AIGP 2024-10-15 14:25:09 +00:00
bgp_attr.h bgpd: use igpmetric in bgp_aigp_metric_total() 2025-01-10 14:27:46 +00:00
bgp_bfd.c bgpd: Move the peer->su to connection->su 2023-09-10 08:31:25 -04: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:16 +00:00
bgp_bmp.h bgpd: loc-rib uptime moved to bgp_path_info_extra and set in header 2023-11-04 12:17:48 +01:00
bgp_btoa.c *: zebra.h should not have fcntl.h 2024-01-09 12:50:40 -05:00
bgp_clist.c bgpd: Treat numbered community-list only if it's in a range 1-500 2024-11-05 15:17:31 +00:00
bgp_clist.h bgpd: Treat numbered community-list only if it's in a range 1-500 2024-11-05 15:17:31 +00: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 bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_community.h bgpd: Remove deprecated COMMUNITY_INTERNET community 2023-08-03 17:12:19 +03:00
bgp_conditional_adv.c bgpd: Ensure community data is freed in some cases. 2024-03-14 08:26:15 +00:00
bgp_conditional_adv.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_damp.c bgpd: Initialise timebuf arrays to zeros for dampening reuse timer 2023-09-22 12:04:17 +03:00
bgp_damp.h bgpd: Optimize memory usage for bgp_damp_config struct 2024-01-30 08:12:59 +02:00
bgp_debug.c bgpd: add hooks for displaying module debug messages 2024-01-11 14:38:23 +01:00
bgp_debug.h bgpd: add hooks for displaying module debug messages 2024-01-11 14:38:23 +01: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: fix ecommunity_fill_pbr_action heap-buffer-overflow 2024-01-04 17:32:01 +01:00
bgp_ecommunity.h bgpd: Optimize memory for ecommunity struct 2024-02-09 17:21:23 +02: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_mh.c bgpd: revamp evpn debugs nexthop and l3vni 2023-12-27 16:13:13 -08:00
bgp_evpn_mh.h bgpd: Drop unused function bgp_evpn_attr_get_df_pref() 2024-02-06 14:02:51 +02:00
bgp_evpn_private.h bgpd: Convert from struct bgp_node to struct bgp_dest 2023-08-22 09:35:46 +08:00
bgp_evpn_vty.c bgpd: EVPN fix per rd specific type-2 json output 2024-09-25 18:54:12 +00:00
bgp_evpn_vty.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_evpn.c bgpd:aggr summary-only remove suppressed from evpn 2024-03-05 20:43:14 +00:00
bgp_evpn.h bgpd:aggr summary-only remove suppressed from evpn 2024-03-05 20:43:14 +00:00
bgp_filter.c bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-06-24 21:09:28 +00:00
bgp_filter.h bgpd: fix "bgp as-pah access-list" with "set aspath exclude" set/unset issues 2024-06-24 21:09:28 +00: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 bgpd: fix use single whitespace when displaying flowspec entries 2024-11-26 18:12:40 +00: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: Do not start BGP session if BGP identifier is not set 2025-02-05 15:06:56 +02:00
bgp_fsm.h bgpd: Fix format overflow for graceful-restart debug logs 2024-01-24 09:06:43 +02: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: Used %pBD instead of %pRN 2023-11-13 10:28:28 -05: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: bgp_sync_label_manager failure case 2024-01-06 20:26:14 -05:00
bgp_labelpool.h bgpd: Use synchronous way to get labels from Zebra 2023-06-20 20:50:10 +03: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: peer_established should be connection oriented 2023-09-10 08:31:25 -04:00
bgp_mac.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_main.c bgpd: Actually make --v6-with-v4-nexthops it work 2024-10-02 15:09:25 +00:00
bgp_memory.c bgpd: Save memory when using bgp_path_info_extra and vnc 2024-02-01 07:54:35 -05:00
bgp_memory.h bgpd: Save memory when using bgp_path_info_extra and vnc 2024-02-01 07:54:35 -05:00
bgp_mpath.c bgpd: Used %pBD instead of %pRN 2023-11-13 10:28:28 -05:00
bgp_mpath.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn_snmp.c bgpd: MTYPE_BGP was being overused split up 2023-11-21 12:41:18 -05:00
bgp_mplsvpn_snmp.h *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_mplsvpn.c Merge pull request #17206 from louis-6wind/fix-bgp-labels-10.0 2024-10-25 07:12:52 +03:00
bgp_mplsvpn.h bgpd: fix export prefixes when rt extcomm set by route-map 2023-11-21 18:10:38 +01:00
bgp_network.c bgpd: Do not start BGP session if BGP identifier is not set 2025-02-05 15:06:56 +02:00
bgp_network.h bgpd: Set TCP min MSS per listener 2023-09-18 22:34:45 +03:00
bgp_nexthop.c Revert "bgpd: combine import_check_table and nexthop_check_table" 2023-11-06 10:07:58 -05:00
bgp_nexthop.h bgpd: Optimize memory for bgp_nexthop_cache struct 2024-02-09 17:25:05 +02: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-29 12:12:19 +01: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: Fix logging message when receiving a software version capability 2024-05-20 13:46:42 +00:00
bgp_open.h bgpd: Reuse orf_type_str/orf_mode_str for dynamic capabilities code 2023-10-17 16:01:00 +03:00
bgp_packet.c Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:23:37 +02: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 09:47:15 +01: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 Revert "bgpd: Send non-transitive extended communities from/to OAD peers" 2025-02-05 11:47:04 +02:00
bgp_route.h bgpd: Fix display when using missing-as-worst 2024-04-16 14:15:18 +00:00
bgp_routemap_nb_config.c bgpd, yang: fix missing mandatory/default statements on some leafs 2024-02-26 07:44:44 +00:00
bgp_routemap_nb.c bgpd, yang: fix missing mandatory/default statements on some leafs 2024-02-26 07:44:44 +00:00
bgp_routemap_nb.h bgpd, yang: fix missing mandatory/default statements on some leafs 2024-02-26 07:44:44 +00:00
bgp_routemap.c bgpd: allow value 0 in aigp-metric setting 2024-10-21 08:34:36 +00:00
bgp_rpki.c bgpd: Validate only affected RPKI prefixes instead of a full RIB 2024-12-20 23:09:32 +02: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 *: auto-convert to SPDX License IDs 2023-02-09 14:09:11 +01:00
bgp_snmp_bgp4.c Revert "bgpd: fix pointer arithmetic in bgp snmp module" 2024-04-24 11:26:21 +00: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:13:37 +00:00
bgp_snmp_bgp4v2.h bgpd: add snmp traps for bgp4-mibv2 2023-10-24 17:16:47 +02:00
bgp_snmp.c bgpd: fix new Formatting / Styling warning 2023-10-24 17:16:47 +02:00
bgp_snmp.h bgpd: add [no] bgp snmp traps bgp4-mibv2 command 2023-10-24 17:16:47 +02:00
bgp_table.c Revert "bgpd: store bgp link-state prefixes" 2023-10-10 16:45:00 -04:00
bgp_table.h bgpd: bgp_clear_adj_in|remove dest may be freed 2023-09-10 12:14:00 -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 bgpd: lttng tp add ethtag to macip zebra send 2023-12-27 18:01:50 -08:00
bgp_updgrp_adv.c bgpd: Fix display when using missing-as-worst 2024-04-16 14:15:18 +00:00
bgp_updgrp_packet.c Revert "bgpd: fix 6vpe nexthop" 2024-04-04 20:07:53 +03:00
bgp_updgrp.c bgpd: Increase peer's struct cap from uint32 to uint64 2024-01-24 23:09:52 +02:00
bgp_updgrp.h bgpd: Ensure community data is freed in some cases. 2024-03-14 08:26:15 +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-16 14:15:18 +00: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:49 +00:00
bgp_vty.h bgpd: Add neighbor X send-community extended rpki command 2024-02-07 22:35:21 +02:00
bgp_zebra.c bgpd: Fix for local interface MAC cache issue in 'bgp mac hash' table 2025-01-21 14:31:11 +00:00
bgp_zebra.h bgpd: fix flushing ipv6 flowspec entries when peering stops 2024-02-07 23:01:25 +01:00
bgpd.c Revert "bgpd: Handle Addpath capability using dynamic capabilities" 2025-01-28 11:23:37 +02:00
bgpd.h bgpd: Do not start BGP session if BGP identifier is not set 2025-02-05 15:06:56 +02:00
Makefile
subdir.am bgpd: move l3nhg functions in separate bgp_nhg.[ch] file 2023-12-11 21:03:33 +01:00