summaryrefslogtreecommitdiff
path: root/bgpd/bgp_open.c
diff options
context:
space:
mode:
authorFrancois Dumontet <francois.dumontet@6wind.com>2024-01-22 11:53:36 +0100
committerFrancois Dumontet <francois.dumontet@6wind.com>2024-02-02 11:31:47 +0100
commite146ea53ef5a8f33d9bdb2f79410682fe710e37c (patch)
tree2bd2dc807b81134d62b59a34607afdf38d69f83f /bgpd/bgp_open.c
parent14c7797b725bd263fb662c9b712fbe041e1bc118 (diff)
bgpd: add [no]neighbor capability fqdn command
cisco routers are not dealing fairly whith unsupported capabilities. When a cisco router receive an unsupported capabilities it reset the negociation without notifying the unmatching capability as described in RFC2842. Cisco suggest the use of neighbor x.x.x.x capability fqdn to avoid the use of fqdn in open message. this new command is to remove the use of fqdn capability in the open message with the peer "x.x.x.x". Link: https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/116189-problemsolution-technology-00.pdf Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r--bgpd/bgp_open.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
index 154efdedaf..43a59e2448 100644
--- a/bgpd/bgp_open.c
+++ b/bgpd/bgp_open.c
@@ -1897,8 +1897,9 @@ uint16_t bgp_open_capability(struct stream *s, struct peer *peer,
stream_putc(s, CAPABILITY_CODE_DYNAMIC_LEN);
}
- /* Hostname capability */
- if (cmd_hostname_get()) {
+ /* FQDN capability */
+ if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_FQDN)
+ && cmd_hostname_get()) {
SET_FLAG(peer->cap, PEER_CAP_HOSTNAME_ADV);
stream_putc(s, BGP_OPEN_OPT_CAP);
rcapp = stream_get_endp(s); /* Ptr to length placeholder */