Merge pull request #9255 from ton31337/fix/bgp_max_packet_size_no_capabilities

bgpd: Set extended msg size only if we advertised and received capability
This commit is contained in:
Donald Sharp 2021-08-02 12:11:24 -04:00 committed by GitHub
commit b22928a117
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,7 +1216,8 @@ int bgp_open_option_parse(struct peer *peer, uint8_t length, int *mp_capability)
/* Extended Message Support */
peer->max_packet_size =
CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_RCV)
(CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_RCV)
&& CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_ADV))
? BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE
: BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE;