mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 20:40:39 +00:00
Merge pull request #15792 from opensourcerouting/fix/bgp_send_notification_with_data
bgpd: Include capabilities when sending NOTIFICATION(7)
This commit is contained in:
commit
855fa82f37
@ -1452,8 +1452,10 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
/* All OPEN option is parsed. Check capability when strict compare
|
/* All OPEN option is parsed. Check capability when strict compare
|
||||||
flag is enabled.*/
|
flag is enabled.*/
|
||||||
if (CHECK_FLAG(peer->flags, PEER_FLAG_STRICT_CAP_MATCH)) {
|
if (CHECK_FLAG(peer->flags, PEER_FLAG_STRICT_CAP_MATCH)) {
|
||||||
/* If Unsupported Capability exists. */
|
/* If Unsupported Capability exists or local capability does
|
||||||
if (error != error_data) {
|
* not negotiated with remote peer
|
||||||
|
*/
|
||||||
|
if (error != error_data || !strict_capability_same(peer)) {
|
||||||
bgp_notify_send_with_data(peer->connection,
|
bgp_notify_send_with_data(peer->connection,
|
||||||
BGP_NOTIFY_OPEN_ERR,
|
BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_UNSUP_CAPBL,
|
BGP_NOTIFY_OPEN_UNSUP_CAPBL,
|
||||||
@ -1461,14 +1463,6 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
error - error_data);
|
error - error_data);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check local capability does not negotiated with remote
|
|
||||||
peer. */
|
|
||||||
if (!strict_capability_same(peer)) {
|
|
||||||
bgp_notify_send(peer->connection, BGP_NOTIFY_OPEN_ERR,
|
|
||||||
BGP_NOTIFY_OPEN_UNSUP_CAPBL);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Extended Message Support */
|
/* Extended Message Support */
|
||||||
@ -1503,17 +1497,11 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|||||||
"%s [Error] Configured AFI/SAFIs do not overlap with received MP capabilities",
|
"%s [Error] Configured AFI/SAFIs do not overlap with received MP capabilities",
|
||||||
peer->host);
|
peer->host);
|
||||||
|
|
||||||
if (error != error_data)
|
|
||||||
bgp_notify_send_with_data(peer->connection,
|
bgp_notify_send_with_data(peer->connection,
|
||||||
BGP_NOTIFY_OPEN_ERR,
|
BGP_NOTIFY_OPEN_ERR,
|
||||||
BGP_NOTIFY_OPEN_UNSUP_CAPBL,
|
BGP_NOTIFY_OPEN_UNSUP_CAPBL,
|
||||||
error_data,
|
error_data,
|
||||||
error - error_data);
|
error - error_data);
|
||||||
else
|
|
||||||
bgp_notify_send(peer->connection,
|
|
||||||
BGP_NOTIFY_OPEN_ERR,
|
|
||||||
BGP_NOTIFY_OPEN_UNSUP_CAPBL);
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user