diff options
author | Russ White <russ@riw.us> | 2023-09-26 16:07:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 16:07:02 +0200 |
commit | 8e755a03a3257644c0542a8ee658d2c08230c0ae (patch) | |
tree | a4d58a1595c3884d9555d88d533fd2043a8de21d /bgpd/bgp_open.c | |
parent | Merge pull request #14487 from opensourcerouting/fix/doc_bullet_new_line_missing (diff) | |
parent | doc: add information to display bgp-ls attributes (diff) | |
download | frr-8e755a03a3257644c0542a8ee658d2c08230c0ae.tar.xz frr-8e755a03a3257644c0542a8ee658d2c08230c0ae.zip |
Merge pull request #12649 from louis-6wind/bgp-link-state
bgpd: add basic support of BGP Link-State RFC7752
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r-- | bgpd/bgp_open.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 6ee5b5dc5..8a202b480 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -147,6 +147,12 @@ void bgp_capability_vty_out(struct vty *vty, struct peer *peer, bool use_json, "capabilityErrorMultiProtocolAfi", "L2VPN"); break; + case AFI_LINKSTATE: + json_object_string_add( + json_cap, + "capabilityErrorMultiProtocolAfi", + "Link State"); + break; case AFI_UNSPEC: case AFI_MAX: json_object_int_add( @@ -198,6 +204,18 @@ void bgp_capability_vty_out(struct vty *vty, struct peer *peer, bool use_json, "capabilityErrorMultiProtocolSafi", "flowspec"); break; + case SAFI_LINKSTATE: + json_object_string_add( + json_cap, + "capabilityErrorMultiProtocolSafi", + "Link State"); + break; + case SAFI_LINKSTATE_VPN: + json_object_string_add( + json_cap, + "capabilityErrorMultiProtocolSafi", + "Link State VPN"); + break; case SAFI_UNSPEC: case SAFI_MAX: json_object_int_add( @@ -219,6 +237,9 @@ void bgp_capability_vty_out(struct vty *vty, struct peer *peer, bool use_json, case AFI_L2VPN: vty_out(vty, "AFI L2VPN, "); break; + case AFI_LINKSTATE: + vty_out(vty, "AFI Link State, "); + break; case AFI_UNSPEC: case AFI_MAX: vty_out(vty, "AFI Unknown %d, ", @@ -247,6 +268,12 @@ void bgp_capability_vty_out(struct vty *vty, struct peer *peer, bool use_json, case SAFI_EVPN: vty_out(vty, "SAFI EVPN"); break; + case SAFI_LINKSTATE: + vty_out(vty, "SAFI LINK STATE"); + break; + case SAFI_LINKSTATE_VPN: + vty_out(vty, "SAFI LINK STATE VPN"); + break; case SAFI_UNSPEC: case SAFI_MAX: vty_out(vty, "SAFI Unknown %d ", @@ -1414,7 +1441,8 @@ int bgp_open_option_parse(struct peer *peer, uint16_t length, && !peer->afc_nego[AFI_IP6][SAFI_MPLS_VPN] && !peer->afc_nego[AFI_IP6][SAFI_ENCAP] && !peer->afc_nego[AFI_IP6][SAFI_FLOWSPEC] - && !peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) { + && !peer->afc_nego[AFI_L2VPN][SAFI_EVPN] + && !peer->afc_nego[AFI_LINKSTATE][SAFI_LINKSTATE]) { flog_err(EC_BGP_PKT_OPEN, "%s [Error] Configured AFI/SAFIs do not overlap with received MP capabilities", peer->host); |