diff options
| author | Russ White <russ@riw.us> | 2025-01-28 10:35:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-28 10:35:57 -0500 |
| commit | f3b6651954676ebfd832228d3b1b9efd9c6de6b9 (patch) | |
| tree | 4181c1082560e0a40a1ecec8426f58f90ee60c92 /bgpd | |
| parent | 7b6f686a9fd634cc00a4be63af05d41ac239f8ce (diff) | |
| parent | 2df722262f9d72671f3b29026ba01a2e07af789d (diff) | |
Merge pull request #17863 from opensourcerouting/fix/bgp_coverity_1617727
bgpd: Check if the peer really exists before sending dynamic capability
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_packet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 0780b4f72d..f8726ffff9 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -1225,6 +1225,9 @@ void bgp_capability_send(struct peer *peer, afi_t afi, safi_t safi, const char *hostname = cmd_hostname_get(); const char *domainname = cmd_domainname_get(); + if (!peer) + return; + if (!peer_established(peer->connection)) return; |
