2023-02-08 13:17:09 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2002-12-13 21:15:29 +01:00
|
|
|
/* BGP open message handling
|
2017-05-13 10:25:29 +02:00
|
|
|
* Copyright (C) 1999 Kunihiro Ishiguro
|
|
|
|
*/
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2005-05-23 16:19:54 +02:00
|
|
|
#ifndef _QUAGGA_BGP_OPEN_H
|
|
|
|
#define _QUAGGA_BGP_OPEN_H
|
|
|
|
|
[bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not always present or correct).
* bgp_open.h: Add structures for the generic capability TLV header
and for the data formats of the various specific capabilities we
support. Hence remove the badly named, or else misdefined, struct
capability.
* bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data.
Do the length checks *before* memcpy()'ing based on that length
(stored capability - should have been validated anyway on input,
but..).
(bgp_afi_safi_valid_indices) new function to validate (afi,safi)
which is about to be used as index into arrays, consolidates
several instances of same, at least one of which appeared to be
incomplete..
(bgp_capability_mp) Much condensed.
(bgp_capability_orf_entry) New, process one ORF entry
(bgp_capability_orf) Condensed. Fixed to process all ORF entries.
(bgp_capability_restart) Condensed, and fixed to use a
cap-specific type, rather than abusing capability_mp.
(struct message capcode_str) added to aid generic logging.
(size_t cap_minsizes[]) added to aid generic validation of
capability length field.
(bgp_capability_parse) Generic logging and validation of TLV
consolidated here. Code compacted as much as possible.
* bgp_packet.c: (bgp_open_receive) Capability parsers now use
streams, so no more need here to manually fudge the input stream
getp.
(bgp_capability_msg_parse) use struct capability_mp_data. Validate
lengths /before/ memcpy. Use bgp_afi_safi_valid_indices.
(bgp_capability_receive) Exported for use by test harness.
* bgp_vty.c: (bgp_show_summary) fix conversion warning
(bgp_show_peer) ditto
* bgp_debug.h: Fix storage 'extern' after type 'const'.
* lib/log.c: (mes_lookup) warning about code not being in
same-number array slot should be debug, not warning. E.g. BGP
has several discontigious number spaces, allocating from
different parts of a space is not uncommon (e.g. IANA
assigned versus vendor-assigned code points in some number
space).
2007-08-06 17:21:45 +02:00
|
|
|
/* Standard header for capability TLV */
|
|
|
|
struct capability_header {
|
2018-03-27 21:13:34 +02:00
|
|
|
uint8_t code;
|
|
|
|
uint8_t length;
|
[bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not always present or correct).
* bgp_open.h: Add structures for the generic capability TLV header
and for the data formats of the various specific capabilities we
support. Hence remove the badly named, or else misdefined, struct
capability.
* bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data.
Do the length checks *before* memcpy()'ing based on that length
(stored capability - should have been validated anyway on input,
but..).
(bgp_afi_safi_valid_indices) new function to validate (afi,safi)
which is about to be used as index into arrays, consolidates
several instances of same, at least one of which appeared to be
incomplete..
(bgp_capability_mp) Much condensed.
(bgp_capability_orf_entry) New, process one ORF entry
(bgp_capability_orf) Condensed. Fixed to process all ORF entries.
(bgp_capability_restart) Condensed, and fixed to use a
cap-specific type, rather than abusing capability_mp.
(struct message capcode_str) added to aid generic logging.
(size_t cap_minsizes[]) added to aid generic validation of
capability length field.
(bgp_capability_parse) Generic logging and validation of TLV
consolidated here. Code compacted as much as possible.
* bgp_packet.c: (bgp_open_receive) Capability parsers now use
streams, so no more need here to manually fudge the input stream
getp.
(bgp_capability_msg_parse) use struct capability_mp_data. Validate
lengths /before/ memcpy. Use bgp_afi_safi_valid_indices.
(bgp_capability_receive) Exported for use by test harness.
* bgp_vty.c: (bgp_show_summary) fix conversion warning
(bgp_show_peer) ditto
* bgp_debug.h: Fix storage 'extern' after type 'const'.
* lib/log.c: (mes_lookup) warning about code not being in
same-number array slot should be debug, not warning. E.g. BGP
has several discontigious number spaces, allocating from
different parts of a space is not uncommon (e.g. IANA
assigned versus vendor-assigned code points in some number
space).
2007-08-06 17:21:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Generic MP capability data */
|
|
|
|
struct capability_mp_data {
|
2017-08-01 02:37:46 +02:00
|
|
|
uint16_t afi; /* iana_afi_t */
|
2018-03-27 21:13:34 +02:00
|
|
|
uint8_t reserved;
|
2017-08-01 02:37:46 +02:00
|
|
|
uint8_t safi; /* iana_safi_t */
|
2002-12-13 21:15:29 +01:00
|
|
|
};
|
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
struct graceful_restart_af {
|
2023-09-07 09:16:22 +02:00
|
|
|
uint16_t afi;
|
|
|
|
uint8_t safi;
|
2018-03-27 21:13:34 +02:00
|
|
|
uint8_t flag;
|
2004-05-21 11:31:30 +02:00
|
|
|
};
|
|
|
|
|
2023-09-07 09:17:52 +02:00
|
|
|
/*
|
|
|
|
* +--------------------------------------------------+
|
|
|
|
* | Address Family Identifier (16 bits) |
|
|
|
|
* +--------------------------------------------------+
|
|
|
|
* | Subsequent Address Family Identifier (8 bits) |
|
|
|
|
* +--------------------------------------------------+
|
|
|
|
* | Flags for Address Family (8 bits) |
|
|
|
|
* +--------------------------------------------------+
|
|
|
|
* | Long-lived Stale Time (24 bits) |
|
|
|
|
* +--------------------------------------------------+
|
|
|
|
*/
|
|
|
|
#define BGP_CAP_LLGR_MIN_PACKET_LEN 7
|
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
/* Capability Code */
|
|
|
|
#define CAPABILITY_CODE_MP 1 /* Multiprotocol Extensions */
|
|
|
|
#define CAPABILITY_CODE_REFRESH 2 /* Route Refresh Capability */
|
|
|
|
#define CAPABILITY_CODE_ORF 3 /* Cooperative Route Filtering Capability */
|
|
|
|
#define CAPABILITY_CODE_RESTART 64 /* Graceful Restart Capability */
|
[bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not always present or correct).
* bgp_open.h: Add structures for the generic capability TLV header
and for the data formats of the various specific capabilities we
support. Hence remove the badly named, or else misdefined, struct
capability.
* bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data.
Do the length checks *before* memcpy()'ing based on that length
(stored capability - should have been validated anyway on input,
but..).
(bgp_afi_safi_valid_indices) new function to validate (afi,safi)
which is about to be used as index into arrays, consolidates
several instances of same, at least one of which appeared to be
incomplete..
(bgp_capability_mp) Much condensed.
(bgp_capability_orf_entry) New, process one ORF entry
(bgp_capability_orf) Condensed. Fixed to process all ORF entries.
(bgp_capability_restart) Condensed, and fixed to use a
cap-specific type, rather than abusing capability_mp.
(struct message capcode_str) added to aid generic logging.
(size_t cap_minsizes[]) added to aid generic validation of
capability length field.
(bgp_capability_parse) Generic logging and validation of TLV
consolidated here. Code compacted as much as possible.
* bgp_packet.c: (bgp_open_receive) Capability parsers now use
streams, so no more need here to manually fudge the input stream
getp.
(bgp_capability_msg_parse) use struct capability_mp_data. Validate
lengths /before/ memcpy. Use bgp_afi_safi_valid_indices.
(bgp_capability_receive) Exported for use by test harness.
* bgp_vty.c: (bgp_show_summary) fix conversion warning
(bgp_show_peer) ditto
* bgp_debug.h: Fix storage 'extern' after type 'const'.
* lib/log.c: (mes_lookup) warning about code not being in
same-number array slot should be debug, not warning. E.g. BGP
has several discontigious number spaces, allocating from
different parts of a space is not uncommon (e.g. IANA
assigned versus vendor-assigned code points in some number
space).
2007-08-06 17:21:45 +02:00
|
|
|
#define CAPABILITY_CODE_AS4 65 /* 4-octet AS number Capability */
|
2015-05-20 03:03:49 +02:00
|
|
|
#define CAPABILITY_CODE_DYNAMIC 67 /* Dynamic Capability */
|
2015-05-20 03:03:45 +02:00
|
|
|
#define CAPABILITY_CODE_ADDPATH 69 /* Addpath Capability */
|
2020-10-01 22:08:06 +02:00
|
|
|
#define CAPABILITY_CODE_ENHANCED_RR 70 /* Enhanced Route Refresh capability */
|
bgpd: Add Long-lived Graceful Restart capability (restarter)
Restart Router mode.
FRRouting (Restarter):
```
bgp long-lived-graceful-restart stale-time 10
bgp graceful-restart restart-time 1
```
Tested with GoBGP (Helper):
```
long-lived-graceful-restart: advertised and received
Local:
ipv4-unicast, restart time 100000 sec
Remote:
ipv4-unicast, restart time 10 sec, forward flag set
```
Logs:
```
{"Key":"192.168.10.123","Reason":"graceful-restart","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2021-10-25T17:48:36+03:00"}
{"Key":"192.168.10.123","State":"BGP_FSM_IDLE","Topic":"Peer","level":"warning","msg":"graceful restart timer expired","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"start LLGR restart timer (10 sec) for ipv4-unicast","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"LLGR restart timer (10 sec) for ipv4-unicast expired","time":"2021-10-25T17:48:47+03:00"}
% ./gobgp global rib
Network Next Hop AS_PATH Age Attrs
S*>10.0.2.0/24 192.168.10.123 174 00:12:08 [{Origin: ?} {Med: 0} {Communities: llgr-stale} {Extcomms: [174:1282304808]}]
```
Helper mode will be added with upcoming PRs.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-25 16:23:02 +02:00
|
|
|
#define CAPABILITY_CODE_LLGR 71 /* Long-lived Graceful Restart */
|
2019-02-27 19:09:08 +01:00
|
|
|
#define CAPABILITY_CODE_FQDN 73 /* Advertise hostname capability */
|
bgpd: Add BGP Software Version Capability
Implement: https://datatracker.ietf.org/doc/html/draft-abraitis-bgp-version-capability
Tested with GoBGP:
```
% ./gobgp neighbor 192.168.10.124
BGP neighbor is 192.168.10.124, remote AS 65001
BGP version 4, remote router ID 200.200.200.202
BGP state = ESTABLISHED, up for 00:01:49
BGP OutQ = 0, Flops = 0
Hold time is 3, keepalive interval is 1 seconds
Configured hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
multiprotocol:
ipv4-unicast: advertised and received
ipv6-unicast: advertised
route-refresh: advertised and received
extended-nexthop: advertised
Local: nlri: ipv4-unicast, nexthop: ipv6
UnknownCapability(6): received
UnknownCapability(9): received
graceful-restart: advertised and received
Local: restart time 10 sec
ipv6-unicast
ipv4-unicast
Remote: restart time 120 sec, notification flag set
ipv4-unicast, forward flag set
4-octet-as: advertised and received
add-path: received
Remote:
ipv4-unicast: receive
enhanced-route-refresh: received
long-lived-graceful-restart: advertised and received
Local:
ipv6-unicast, restart time 10 sec
ipv4-unicast, restart time 20 sec
Remote:
ipv4-unicast, restart time 0 sec, forward flag set
fqdn: advertised and received
Local:
name: donatas-pc, domain:
Remote:
name: spine1-debian-11, domain:
software-version: advertised and received
Local:
GoBGP/3.10.0
Remote:
FRRouting/8.5-dev-MyOwnFRRVersion-gdc92f44a45-dirt
cisco-route-refresh: received
Message statistics:
```
FRR side:
```
root@spine1-debian-11:~# vtysh -c 'show bgp neighbor 192.168.10.17 json' | \
> jq '."192.168.10.17".neighborCapabilities.softwareVersion.receivedSoftwareVersion'
"GoBGP/3.10.0"
root@spine1-debian-11:~#
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-25 08:00:23 +01:00
|
|
|
#define CAPABILITY_CODE_SOFT_VERSION 75 /* Software Version capability */
|
2015-06-11 18:19:12 +02:00
|
|
|
#define CAPABILITY_CODE_ENHE 5 /* Extended Next Hop Encoding */
|
2021-02-25 18:46:49 +01:00
|
|
|
#define CAPABILITY_CODE_EXT_MESSAGE 6 /* Extended Message Support */
|
2022-06-17 12:14:46 +02:00
|
|
|
#define CAPABILITY_CODE_ROLE 9 /* Role Capability */
|
2024-01-23 19:33:18 +01:00
|
|
|
#define CAPABILITY_CODE_PATHS_LIMIT 76 /* Paths Limit Capability */
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
/* Capability Length */
|
|
|
|
#define CAPABILITY_CODE_MP_LEN 4
|
2002-12-13 21:15:29 +01:00
|
|
|
#define CAPABILITY_CODE_REFRESH_LEN 0
|
2004-05-21 11:31:30 +02:00
|
|
|
#define CAPABILITY_CODE_DYNAMIC_LEN 0
|
|
|
|
#define CAPABILITY_CODE_RESTART_LEN 2 /* Receiving only case */
|
[bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not always present or correct).
* bgp_open.h: Add structures for the generic capability TLV header
and for the data formats of the various specific capabilities we
support. Hence remove the badly named, or else misdefined, struct
capability.
* bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data.
Do the length checks *before* memcpy()'ing based on that length
(stored capability - should have been validated anyway on input,
but..).
(bgp_afi_safi_valid_indices) new function to validate (afi,safi)
which is about to be used as index into arrays, consolidates
several instances of same, at least one of which appeared to be
incomplete..
(bgp_capability_mp) Much condensed.
(bgp_capability_orf_entry) New, process one ORF entry
(bgp_capability_orf) Condensed. Fixed to process all ORF entries.
(bgp_capability_restart) Condensed, and fixed to use a
cap-specific type, rather than abusing capability_mp.
(struct message capcode_str) added to aid generic logging.
(size_t cap_minsizes[]) added to aid generic validation of
capability length field.
(bgp_capability_parse) Generic logging and validation of TLV
consolidated here. Code compacted as much as possible.
* bgp_packet.c: (bgp_open_receive) Capability parsers now use
streams, so no more need here to manually fudge the input stream
getp.
(bgp_capability_msg_parse) use struct capability_mp_data. Validate
lengths /before/ memcpy. Use bgp_afi_safi_valid_indices.
(bgp_capability_receive) Exported for use by test harness.
* bgp_vty.c: (bgp_show_summary) fix conversion warning
(bgp_show_peer) ditto
* bgp_debug.h: Fix storage 'extern' after type 'const'.
* lib/log.c: (mes_lookup) warning about code not being in
same-number array slot should be debug, not warning. E.g. BGP
has several discontigious number spaces, allocating from
different parts of a space is not uncommon (e.g. IANA
assigned versus vendor-assigned code points in some number
space).
2007-08-06 17:21:45 +02:00
|
|
|
#define CAPABILITY_CODE_AS4_LEN 4
|
2015-05-20 03:03:45 +02:00
|
|
|
#define CAPABILITY_CODE_ADDPATH_LEN 4
|
2024-01-23 19:33:18 +01:00
|
|
|
#define CAPABILITY_CODE_PATHS_LIMIT_LEN 5
|
2015-06-11 18:19:12 +02:00
|
|
|
#define CAPABILITY_CODE_ENHE_LEN 6 /* NRLI AFI = 2, SAFI = 2, Nexthop AFI = 2 */
|
2016-01-07 15:33:28 +01:00
|
|
|
#define CAPABILITY_CODE_MIN_FQDN_LEN 2
|
2020-10-01 22:08:06 +02:00
|
|
|
#define CAPABILITY_CODE_ENHANCED_LEN 0
|
bgpd: Add Long-lived Graceful Restart capability (restarter)
Restart Router mode.
FRRouting (Restarter):
```
bgp long-lived-graceful-restart stale-time 10
bgp graceful-restart restart-time 1
```
Tested with GoBGP (Helper):
```
long-lived-graceful-restart: advertised and received
Local:
ipv4-unicast, restart time 100000 sec
Remote:
ipv4-unicast, restart time 10 sec, forward flag set
```
Logs:
```
{"Key":"192.168.10.123","Reason":"graceful-restart","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2021-10-25T17:48:36+03:00"}
{"Key":"192.168.10.123","State":"BGP_FSM_IDLE","Topic":"Peer","level":"warning","msg":"graceful restart timer expired","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"start LLGR restart timer (10 sec) for ipv4-unicast","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"LLGR restart timer (10 sec) for ipv4-unicast expired","time":"2021-10-25T17:48:47+03:00"}
% ./gobgp global rib
Network Next Hop AS_PATH Age Attrs
S*>10.0.2.0/24 192.168.10.123 174 00:12:08 [{Origin: ?} {Med: 0} {Communities: llgr-stale} {Extcomms: [174:1282304808]}]
```
Helper mode will be added with upcoming PRs.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-25 16:23:02 +02:00
|
|
|
#define CAPABILITY_CODE_LLGR_LEN 0
|
2016-01-07 15:33:28 +01:00
|
|
|
#define CAPABILITY_CODE_ORF_LEN 5
|
2021-02-25 18:46:49 +01:00
|
|
|
#define CAPABILITY_CODE_EXT_MESSAGE_LEN 0 /* Extended Message Support */
|
2022-06-17 12:14:46 +02:00
|
|
|
#define CAPABILITY_CODE_ROLE_LEN 1
|
bgpd: Add BGP Software Version Capability
Implement: https://datatracker.ietf.org/doc/html/draft-abraitis-bgp-version-capability
Tested with GoBGP:
```
% ./gobgp neighbor 192.168.10.124
BGP neighbor is 192.168.10.124, remote AS 65001
BGP version 4, remote router ID 200.200.200.202
BGP state = ESTABLISHED, up for 00:01:49
BGP OutQ = 0, Flops = 0
Hold time is 3, keepalive interval is 1 seconds
Configured hold time is 90, keepalive interval is 30 seconds
Neighbor capabilities:
multiprotocol:
ipv4-unicast: advertised and received
ipv6-unicast: advertised
route-refresh: advertised and received
extended-nexthop: advertised
Local: nlri: ipv4-unicast, nexthop: ipv6
UnknownCapability(6): received
UnknownCapability(9): received
graceful-restart: advertised and received
Local: restart time 10 sec
ipv6-unicast
ipv4-unicast
Remote: restart time 120 sec, notification flag set
ipv4-unicast, forward flag set
4-octet-as: advertised and received
add-path: received
Remote:
ipv4-unicast: receive
enhanced-route-refresh: received
long-lived-graceful-restart: advertised and received
Local:
ipv6-unicast, restart time 10 sec
ipv4-unicast, restart time 20 sec
Remote:
ipv4-unicast, restart time 0 sec, forward flag set
fqdn: advertised and received
Local:
name: donatas-pc, domain:
Remote:
name: spine1-debian-11, domain:
software-version: advertised and received
Local:
GoBGP/3.10.0
Remote:
FRRouting/8.5-dev-MyOwnFRRVersion-gdc92f44a45-dirt
cisco-route-refresh: received
Message statistics:
```
FRR side:
```
root@spine1-debian-11:~# vtysh -c 'show bgp neighbor 192.168.10.17 json' | \
> jq '."192.168.10.17".neighborCapabilities.softwareVersion.receivedSoftwareVersion'
"GoBGP/3.10.0"
root@spine1-debian-11:~#
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-02-25 08:00:23 +01:00
|
|
|
#define CAPABILITY_CODE_SOFT_VERSION_LEN 1
|
2002-12-13 21:15:29 +01:00
|
|
|
|
|
|
|
/* Cooperative Route Filtering Capability. */
|
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
/* ORF Type */
|
2022-11-03 15:19:21 +01:00
|
|
|
#define ORF_TYPE_RESERVED 0
|
2019-09-17 10:27:03 +02:00
|
|
|
#define ORF_TYPE_PREFIX 64
|
2002-12-13 21:15:29 +01:00
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
/* ORF Mode */
|
2019-09-17 10:27:03 +02:00
|
|
|
#define ORF_MODE_RECEIVE 1
|
|
|
|
#define ORF_MODE_SEND 2
|
|
|
|
#define ORF_MODE_BOTH 3
|
2002-12-13 21:15:29 +01:00
|
|
|
|
|
|
|
/* Capability Message Action. */
|
|
|
|
#define CAPABILITY_ACTION_SET 0
|
|
|
|
#define CAPABILITY_ACTION_UNSET 1
|
|
|
|
|
2004-05-21 11:31:30 +02:00
|
|
|
/* Graceful Restart */
|
2022-04-27 20:50:58 +02:00
|
|
|
#define GRACEFUL_RESTART_R_BIT 0x8000
|
2022-04-30 22:04:58 +02:00
|
|
|
#define GRACEFUL_RESTART_N_BIT 0x4000
|
2022-04-27 20:50:58 +02:00
|
|
|
#define GRACEFUL_RESTART_F_BIT 0x80
|
2004-05-21 11:31:30 +02:00
|
|
|
|
bgpd: Add Long-lived Graceful Restart capability (restarter)
Restart Router mode.
FRRouting (Restarter):
```
bgp long-lived-graceful-restart stale-time 10
bgp graceful-restart restart-time 1
```
Tested with GoBGP (Helper):
```
long-lived-graceful-restart: advertised and received
Local:
ipv4-unicast, restart time 100000 sec
Remote:
ipv4-unicast, restart time 10 sec, forward flag set
```
Logs:
```
{"Key":"192.168.10.123","Reason":"graceful-restart","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2021-10-25T17:48:36+03:00"}
{"Key":"192.168.10.123","State":"BGP_FSM_IDLE","Topic":"Peer","level":"warning","msg":"graceful restart timer expired","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"start LLGR restart timer (10 sec) for ipv4-unicast","time":"2021-10-25T17:48:37+03:00"}
{"Family":65537,"Key":"192.168.10.123","Topic":"Peer","level":"info","msg":"LLGR restart timer (10 sec) for ipv4-unicast expired","time":"2021-10-25T17:48:47+03:00"}
% ./gobgp global rib
Network Next Hop AS_PATH Age Attrs
S*>10.0.2.0/24 192.168.10.123 174 00:12:08 [{Origin: ?} {Med: 0} {Communities: llgr-stale} {Extcomms: [174:1282304808]}]
```
Helper mode will be added with upcoming PRs.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-25 16:23:02 +02:00
|
|
|
/* Long-lived Graceful Restart */
|
|
|
|
#define LLGR_F_BIT 0x80
|
|
|
|
|
2021-11-20 21:00:23 +01:00
|
|
|
/* Optional Parameters */
|
|
|
|
#define BGP_OPEN_NON_EXT_OPT_LEN 255 /* Non-Ext OP Len. */
|
|
|
|
#define BGP_OPEN_NON_EXT_OPT_TYPE_EXTENDED_LENGTH 255 /* Non-Ext OP Type */
|
|
|
|
#define BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer) \
|
|
|
|
(CHECK_FLAG(peer->flags, PEER_FLAG_EXTENDED_OPT_PARAMS) \
|
|
|
|
|| CHECK_FLAG(peer->sflags, PEER_STATUS_EXT_OPT_PARAMS_LENGTH))
|
|
|
|
|
|
|
|
extern int bgp_open_option_parse(struct peer *peer, uint16_t length,
|
|
|
|
int *mp_capability);
|
|
|
|
extern uint16_t bgp_open_capability(struct stream *s, struct peer *peer,
|
|
|
|
bool ext_opt_params);
|
2018-08-30 17:54:46 +02:00
|
|
|
extern void bgp_capability_vty_out(struct vty *vty, struct peer *peer,
|
|
|
|
bool use_json, json_object *json_neigh);
|
2021-11-20 21:00:23 +01:00
|
|
|
extern as_t peek_for_as4_capability(struct peer *peer, uint16_t length);
|
2023-08-29 12:31:22 +02:00
|
|
|
extern const struct message capcode_str[];
|
2023-10-17 15:01:00 +02:00
|
|
|
extern const struct message orf_type_str[];
|
|
|
|
extern const struct message orf_mode_str[];
|
2005-05-23 16:19:54 +02:00
|
|
|
|
|
|
|
#endif /* _QUAGGA_BGP_OPEN_H */
|