Skip to content

Commit

Permalink
Merge pull request #16712 from opensourcerouting/fix/do_not_send_rout…
Browse files Browse the repository at this point in the history
…e_refresh_if_no_capability

bgpd: Do not send route-refresh if it wasn't negotiated in capabilities
  • Loading branch information
riw777 authored Sep 3, 2024
2 parents 2446c63 + 19a85c6 commit 7ba895f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1116,10 +1116,10 @@ void bgp_route_refresh_send(struct peer *peer, afi_t afi, safi_t safi,
s = stream_new(peer->max_packet_size);

/* Make BGP update packet. */
if (CHECK_FLAG(peer->cap, PEER_CAP_REFRESH_RCV))
bgp_packet_set_marker(s, BGP_MSG_ROUTE_REFRESH_NEW);
else
bgp_packet_set_marker(s, BGP_MSG_ROUTE_REFRESH_OLD);
if (!CHECK_FLAG(peer->cap, PEER_CAP_REFRESH_RCV))
return;

bgp_packet_set_marker(s, BGP_MSG_ROUTE_REFRESH_NEW);

/* Encode Route Refresh message. */
stream_putw(s, pkt_afi);
Expand Down

0 comments on commit 7ba895f

Please sign in to comment.