summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_fsm.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-15 13:19:11 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2020-03-16 08:22:22 +0100
commit3893aeeea3f7c3f0d83e428f23f02fcc02568b1c (patch)
tree633b55231a558cedcdc31a4a7e21e34a7d889342 /bgpd/bgp_fsm.h
parentMerge pull request #5854 from qlyoung/fix-zapi-ipset-entry-bad-family (diff)
downloadfrr-3893aeeea3f7c3f0d83e428f23f02fcc02568b1c.tar.xz
frr-3893aeeea3f7c3f0d83e428f23f02fcc02568b1c.zip
bgpd: Add subcodes for BGP Finite State Machine Error
Implement https://tools.ietf.org/html/rfc6608 I used python scapy library to send a notification message in OpenSent state: ``` send(IP(dst="192.168.0.1")/TCP(sport=sp, dport=179, seq=rec.ack, ack=rec.seq + 1, flags=0x18)/BGPHeader(type=3)/BGPNotification(error_code=4, error_subcode=0)) ``` Logs from FRR: ``` %NOTIFICATION: sent to neighbor 192.168.0.2 5/1 (Neighbor Events Error/Receive Unexpected Message in OpenSent State) 0 bytes ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_fsm.h')
-rw-r--r--bgpd/bgp_fsm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_fsm.h b/bgpd/bgp_fsm.h
index 6feabbf57..4b8db161d 100644
--- a/bgpd/bgp_fsm.h
+++ b/bgpd/bgp_fsm.h
@@ -121,6 +121,7 @@ extern void bgp_update_delay_end(struct bgp *);
extern void bgp_maxmed_update(struct bgp *);
extern int bgp_maxmed_onstartup_configured(struct bgp *);
extern int bgp_maxmed_onstartup_active(struct bgp *);
+extern int bgp_fsm_error_subcode(int status);
/**
* Start the route advertisement timer (that honors MRAI) for all the