summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorckishimo <carles.kishimoto@gmail.com>2019-08-20 10:39:47 +0200
committerckishimo <carles.kishimoto@gmail.com>2019-08-20 17:01:54 +0200
commit43104d3f8a89543f6fe51115e28d4630b7fa8b87 (patch)
tree5f67b2389ab5f870766c176c2fe1a11661d0dc18
parent1fac78d737dbc5066461e6b7dcff4bacdb072e96 (diff)
downloadtcpdump-43104d3f8a89543f6fe51115e28d4630b7fa8b87.tar.gz
add bgp LLGR capability
-rw-r--r--print-bgp.c3
-rw-r--r--tests/TESTLIST1
-rw-r--r--tests/bgp-evpn.out3
-rw-r--r--tests/bgp-llgr.out23
4 files changed, 28 insertions, 2 deletions
diff --git a/print-bgp.c b/print-bgp.c
index fe859def..97f3bbee 100644
--- a/print-bgp.c
+++ b/print-bgp.c
@@ -223,6 +223,7 @@ static const struct tok bgp_opt_values[] = {
#define BGP_CAPCODE_MULTISESS 68 /* draft-ietf-idr-bgp-multisession */
#define BGP_CAPCODE_ADD_PATH 69 /* RFC7911 */
#define BGP_CAPCODE_ENH_RR 70 /* draft-keyur-bgp-enhanced-route-refresh */
+#define BGP_CAPCODE_LLGR 71 /* draft-uttaro-idr-bgp-persistence-05 */
#define BGP_CAPCODE_RR_CISCO 128
static const struct tok bgp_capcode_values[] = {
@@ -238,6 +239,7 @@ static const struct tok bgp_capcode_values[] = {
{ BGP_CAPCODE_MULTISESS, "Multisession BGP"},
{ BGP_CAPCODE_ADD_PATH, "Multiple Paths"},
{ BGP_CAPCODE_ENH_RR, "Enhanced Route Refresh"},
+ { BGP_CAPCODE_LLGR, "Long-lived Graceful Restart"},
{ BGP_CAPCODE_RR_CISCO, "Route Refresh (Cisco)"},
{ 0, NULL}
};
@@ -2473,6 +2475,7 @@ bgp_capabilities_print(netdissect_options *ndo,
}
break;
case BGP_CAPCODE_RR:
+ case BGP_CAPCODE_LLGR:
case BGP_CAPCODE_RR_CISCO:
break;
case BGP_CAPCODE_AS_NEW:
diff --git a/tests/TESTLIST b/tests/TESTLIST
index 68467bf6..300be7fd 100644
--- a/tests/TESTLIST
+++ b/tests/TESTLIST
@@ -31,6 +31,7 @@ bgp-4byte-asn bgp-4byte-asn.pcap bgp-4byte-asn.out -v
bgp-4byte-asdot bgp-4byte-asn.pcap bgp-4byte-asdot.out -vb
bgp-lu-multiple-labels bgp-lu-multiple-labels.pcap bgp-lu-multiple-labels.out -v
bgp-evpn bgp-evpn.pcap bgp-evpn.out -v
+bgp-llgr bgp-evpn.pcap bgp-llgr.out -v
# Broadcom tag tests
brcmtag brcm-tag.pcap brcm-tag.out
diff --git a/tests/bgp-evpn.out b/tests/bgp-evpn.out
index b961d684..e423fb83 100644
--- a/tests/bgp-evpn.out
+++ b/tests/bgp-evpn.out
@@ -20,5 +20,4 @@
32-Bit AS Number (65), length: 4
4 Byte AS 65000
Option Capabilities Advertisement (2), length: 2
- Unknown (71), length: 0
- no decoder for Capability 71
+ Long-lived Graceful Restart (71), length: 0
diff --git a/tests/bgp-llgr.out b/tests/bgp-llgr.out
new file mode 100644
index 00000000..e423fb83
--- /dev/null
+++ b/tests/bgp-llgr.out
@@ -0,0 +1,23 @@
+ 1 14:33:30.055180 IP (tos 0xc0, ttl 255, id 64247, offset 0, flags [none], proto TCP (6), length 123)
+ 2.2.2.2.179 > 3.3.3.3.56988: Flags [P.], cksum 0x3c01 (correct), seq 334666955:334667026, ack 4146650227, win 16384, options [nop,nop,TS val 2156984502 ecr 2156984501], length 71: BGP
+ Open Message (1), length: 71
+ Version 4, my AS 65000, Holdtime 90s, ID 2.2.2.2
+ Optional parameters, length: 42
+ Option Capabilities Advertisement (2), length: 6
+ Multiprotocol Extensions (1), length: 4
+ AFI IPv4 (1), SAFI labeled VPN Unicast (128)
+ Option Capabilities Advertisement (2), length: 6
+ Multiprotocol Extensions (1), length: 4
+ AFI VPLS (25), SAFI EVPN (70)
+ Option Capabilities Advertisement (2), length: 2
+ Route Refresh (Cisco) (128), length: 0
+ Option Capabilities Advertisement (2), length: 2
+ Route Refresh (2), length: 0
+ Option Capabilities Advertisement (2), length: 4
+ Graceful Restart (64), length: 2
+ Restart Flags: [none], Restart Time 120s
+ Option Capabilities Advertisement (2), length: 6
+ 32-Bit AS Number (65), length: 4
+ 4 Byte AS 65000
+ Option Capabilities Advertisement (2), length: 2
+ Long-lived Graceful Restart (71), length: 0