summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_open.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-25 16:23:02 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-10-31 19:25:42 +0100
commit8606be8779ccca71d7490007c4923cd28ee2c561 (patch)
tree46debaf0dad2b19c2c31d515968c0fb3030785a3 /bgpd/bgp_open.h
parentMerge pull request #9920 from donaldsharp/zebra_seg6local_race (diff)
downloadfrr-8606be8779ccca71d7490007c4923cd28ee2c561.tar.xz
frr-8606be8779ccca71d7490007c4923cd28ee2c561.zip
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>
Diffstat (limited to 'bgpd/bgp_open.h')
-rw-r--r--bgpd/bgp_open.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/bgpd/bgp_open.h b/bgpd/bgp_open.h
index bc6eedac8..0d616926a 100644
--- a/bgpd/bgp_open.h
+++ b/bgpd/bgp_open.h
@@ -50,6 +50,7 @@ struct graceful_restart_af {
#define CAPABILITY_CODE_DYNAMIC 67 /* Dynamic Capability */
#define CAPABILITY_CODE_ADDPATH 69 /* Addpath Capability */
#define CAPABILITY_CODE_ENHANCED_RR 70 /* Enhanced Route Refresh capability */
+#define CAPABILITY_CODE_LLGR 71 /* Long-lived Graceful Restart */
#define CAPABILITY_CODE_FQDN 73 /* Advertise hostname capability */
#define CAPABILITY_CODE_ENHE 5 /* Extended Next Hop Encoding */
#define CAPABILITY_CODE_REFRESH_OLD 128 /* Route Refresh Capability(cisco) */
@@ -66,6 +67,7 @@ struct graceful_restart_af {
#define CAPABILITY_CODE_ENHE_LEN 6 /* NRLI AFI = 2, SAFI = 2, Nexthop AFI = 2 */
#define CAPABILITY_CODE_MIN_FQDN_LEN 2
#define CAPABILITY_CODE_ENHANCED_LEN 0
+#define CAPABILITY_CODE_LLGR_LEN 0
#define CAPABILITY_CODE_ORF_LEN 5
#define CAPABILITY_CODE_EXT_MESSAGE_LEN 0 /* Extended Message Support */
@@ -88,6 +90,9 @@ struct graceful_restart_af {
#define RESTART_R_BIT 0x8000
#define RESTART_F_BIT 0x80
+/* Long-lived Graceful Restart */
+#define LLGR_F_BIT 0x80
+
extern int bgp_open_option_parse(struct peer *, uint8_t, int *);
extern void bgp_open_capability(struct stream *, struct peer *);
extern void bgp_capability_vty_out(struct vty *vty, struct peer *peer,