mirror_frr/bgpd
Rafael Zalamena 95a99382cb bgpd: fix crash on daemon exit
Don't attempt to send BFD daemon a message to remove the peer
registration on daemon exit, otherwise we'll access a dangling
interface pointer and we'll crash.

This crash was not previosly possible because the function that built
the message was passing the interface pointer but not using it due to
the exit condition.

In `lib/bfd.c`:

```
void bfd_peer_sendmsg(struct zclient *zclient, struct bfd_info *bfd_info,
		      int family, void *dst_ip, void *src_ip, char *if_name,
		      int ttl, int multihop, int cbit, int command,
		      int set_flag, vrf_id_t vrf_id)
{
	struct bfd_session_arg args = {};
	size_t addrlen;

	/* Individual reg/dereg messages are suppressed during shutdown. */
	if (CHECK_FLAG(bfd_gbl.flags, BFD_GBL_FLAG_IN_SHUTDOWN)) {
		if (bfd_debug)
			zlog_debug(
				"%s: Suppressing BFD peer reg/dereg messages",
				__func__);
		return;
	}
```

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-29 17:48:14 -03:00
..
rfapi bgpd, isis, tools: style fixen 2020-04-20 19:15:35 -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 bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_addpath.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_advertise.c bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_advertise.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_aspath.c Merge pull request #5954 from ton31337/feature/rfc7607 2020-03-17 10:27:35 -04:00
bgp_aspath.h Merge pull request #5954 from ton31337/feature/rfc7607 2020-03-17 10:27:35 -04:00
bgp_attr_evpn.c bgpd: Ability to add/update unique extended communities 2020-03-30 20:12:31 -07:00
bgp_attr_evpn.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_attr.c bgpd: Ignore aggregator attribute if it's malformed (0.0.0.0) 2020-05-06 12:55:55 +03:00
bgp_attr.h bgpd: fix multiple bugs with cluster_list attrs 2020-04-05 20:55:02 -04:00
bgp_bfd.c bgpd: fix crash on daemon exit 2020-05-29 17:48:14 -03:00
bgp_bfd.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_bmp.c *: move CLI node names to cmd_node->name 2020-04-16 12:53:59 +02:00
bgp_bmp.h lib,nhrpd,bgpd/bmp: pass resolver failure details 2019-12-11 13:33:36 +01:00
bgp_btoa.c bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_clist.c *: manually remove some more sprintf 2020-04-20 19:14:33 -04:00
bgp_clist.h bgpd, lib: Use bool instead of uint8_t for community/prefix-list "any" 2020-04-16 15:27:51 +03:00
bgp_community.c bgpd: Check to ensure community attributes exist before freeing them 2020-05-05 15:59:38 -04:00
bgp_community.h bgpd: Use COMMUNITY_SIZE instead of just 4 2020-04-08 18:09:25 +03:00
bgp_damp.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_damp.h bgpd: Rework BGP dampening to be per AFI/SAFI 2019-11-11 09:52:40 +02:00
bgp_debug.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04:00
bgp_debug.h lib, bgpd: Another round of struct const prefix cleanup 2020-03-26 16:22:00 -04:00
bgp_dump.c *: manually remove some more sprintf 2020-04-20 19:14:33 -04:00
bgp_dump.h bgpd: hook for bgp peer status change events 2019-08-13 11:59:27 -07:00
bgp_ecommunity.c bgpd: Check to ensure community attributes exist before freeing them 2020-05-05 15:59:38 -04:00
bgp_ecommunity.h bgpd: Announce cumulative link bandwidth to EBGP peers 2020-03-30 20:12:31 -07: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 bgpd: Add a better breadcrumb for when bgp is missconfiged 2020-02-19 10:52:14 -05:00
bgp_errors.h bgpd: Add a better breadcrumb for when bgp is missconfiged 2020-02-19 10:52:14 -05:00
bgp_evpn_private.h bgpd: EVPN RT-2 advertised with 2 labels for prefix-routes-only config 2020-05-08 21:10:10 -07:00
bgp_evpn_vty.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04: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 pull request #6375 from adharkar/frr-master-l3vni_label 2020-05-26 12:14:16 -04:00
bgp_evpn.h lib, bgpd: Another round of struct const prefix cleanup 2020-03-26 16:22:00 -04:00
bgp_filter.c bgpd: really remove the no ip as-path... command 2020-05-11 08:45:11 -04:00
bgp_filter.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_flowspec_private.h bgpd: handle fs nlri over 240 bytes 2020-04-22 12:12:03 +02:00
bgp_flowspec_util.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_flowspec_util.h bgpd: More const struct prefix work 2020-03-22 14:50:46 -04:00
bgp_flowspec_vty.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_flowspec.c bgpd: handle fs nlri over 240 bytes 2020-04-22 12:12:03 +02:00
bgp_flowspec.h bgpd: More const struct prefix work 2020-03-22 14:50:46 -04:00
bgp_fsm.c *: manually remove some more sprintf 2020-04-20 19:14:33 -04:00
bgp_fsm.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_io.c bgpd, lib: fix style from BGP GR code 2020-02-04 15:19:04 -05:00
bgp_io.h bgpd: raise default & max r/w quanta to 64 2019-10-14 18:41:53 +00:00
bgp_keepalives.c *: generously apply const 2019-12-02 15:01:29 +01:00
bgp_keepalives.h bgpd: update pthreads to use lib changes 2018-01-24 15:30:55 -05:00
bgp_label.c *: fix format string warnings 2020-03-29 10:45:46 +02:00
bgp_label.h bgpd: IPv4 LU withdraw using 0x000000 label 2019-11-20 15:28:46 +03:00
bgp_labelpool.c lib, zebra: support label chunk requests for SRGB 2019-07-10 15:20:27 +02:00
bgp_labelpool.h bgpd: replace label pool fifo with DECLARE_LIST 2019-04-27 19:33:45 +02:00
bgp_lcommunity.c bgpd: Check to ensure community attributes exist before freeing them 2020-05-05 15:59:38 -04:00
bgp_lcommunity.h *: use the current project name (FRRouting) 2020-03-25 17:38:56 -04:00
bgp_mac.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_mac.h bgpd: Rework code to use const struct prefix 2020-03-24 07:51:41 -04:00
bgp_main.c *: include vrf northbound module in init 2020-04-16 08:00:15 -07:00
bgp_memory.c bgpd: prefix-sid srv6 l3vpn service tlv 2020-01-15 18:20:35 +09:00
bgp_memory.h bgpd: prefix-sid srv6 l3vpn service tlv 2020-01-15 18:20:35 +09:00
bgp_mpath.c bgpd: Implement options for link bandwidth handling 2020-03-30 20:12:31 -07:00
bgp_mpath.h bgpd: Implement options for link bandwidth handling 2020-03-30 20:12:31 -07:00
bgp_mplsvpn.c bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC 2020-04-01 15:05:26 -04:00
bgp_mplsvpn.h bgpd: router bgp export leaked vpn routes 2019-06-17 15:41:50 -07:00
bgp_network.c bgpd: Use THREAD_CANCEL instead of thread_cancel 2020-05-28 16:51:11 -04:00
bgp_network.h bgpd: Add 'show bgp listeners' command for diagnostics 2020-03-10 09:59:56 -04:00
bgp_nexthop.c bgpd: Enhance BGP NHT show commands 2020-05-25 13:57:53 -07:00
bgp_nexthop.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_nht.c bgpd: During NHT change evaluation, skip inappropriate paths 2020-05-25 14:17:12 -07:00
bgp_nht.h bgpd: turn off RAs when numbered peers are deleted 2020-04-27 17:49:41 +00:00
bgp_open.c bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_open.h bgpd: Remove trailing whitespaces from some header files 2019-09-17 11:28:48 +03:00
bgp_packet.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04:00
bgp_packet.h bgpd, lib: fix style from BGP GR code 2020-02-04 15:19:04 -05:00
bgp_pbr.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04:00
bgp_pbr.h bgpd: Rework code to use const struct prefix 2020-03-24 07:51:41 -04:00
bgp_rd.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04:00
bgp_rd.h bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC 2020-04-01 15:05:26 -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 Merge pull request #6321 from ton31337/fix/configuration_for_labeled_in_place 2020-05-21 07:58:11 -04:00
bgp_route.h bgpd: Force self-next-hop check in next-hop update. 2020-04-11 07:26:33 -07:00
bgp_routemap.c *: replace all random() calls 2020-04-17 20:57:43 -03:00
bgp_rpki.c *: add ->node_exit to struct cmd_node 2020-04-16 12:54:03 +02:00
bgp_snmp.c *: Do not cast to the same type 2020-04-08 17:15:06 +03:00
bgp_table.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_table.h lib: prepare for plugin-based frr_format check 2020-03-29 10:45:46 +02:00
bgp_updgrp_adv.c bgpd: fix typo 2020-04-28 11:11:26 +02:00
bgp_updgrp_packet.c bgpd: Convert users of rn->p to use accessor function 2020-03-26 16:25:16 -04:00
bgp_updgrp.c bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_updgrp.h bgpd: Convert lots of int type functions to bool/void 2020-03-21 14:59:18 +02:00
bgp_vnc_types.h bgpd: #if ENABLE_BGP_VNC -> #ifdef ENABLE_BGP_VNC 2020-04-01 15:05:26 -04:00
bgp_vpn.c *: sprintf -> snprintf 2020-04-20 19:14:33 -04: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 bgpd: remove duplicate cli command installation 2020-05-20 08:25:49 -04:00
bgp_vty.h bgpd: take into account code style recommendations. 2020-04-08 08:56:52 +02:00
bgp_zebra.c bgpd: sanity check when updating nexthop from bgp to zebra 2020-05-18 14:11:03 +02:00
bgp_zebra.h bgpd: Implement options for link bandwidth handling 2020-03-30 20:12:31 -07:00
bgpd.c bgpd: evpn nexthop can be changed by default 2020-05-18 14:11:03 +02:00
bgpd.conf.sample doc: Update documentation about multiple-instance 2019-06-18 09:31:35 -04:00
bgpd.conf.sample2
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 bgpd: Use true/false for reject_as_sets 2020-04-20 12:59:52 +03: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 build: make clippy Makefile rules nicer 2020-04-27 09:52:41 +02:00
valgrind.supp lib/log: add valgrind suppression for zlog 2020-04-01 06:53:26 +02:00