From 1318f45980f05315d22f0dd318c99a6eade7d7cb Mon Sep 17 00:00:00 2001 From: ckishimo Date: Sun, 18 Aug 2019 09:43:08 +0200 Subject: [PATCH] add bgp EVPN SAFI --- print-bgp.c | 3 +++ tests/TESTLIST | 1 + tests/bgp-evpn.out | 24 ++++++++++++++++++++++++ tests/bgp-evpn.pcap | Bin 0 -> 181 bytes 4 files changed, 28 insertions(+) create mode 100644 tests/bgp-evpn.out create mode 100644 tests/bgp-evpn.pcap diff --git a/print-bgp.c b/print-bgp.c index 301d24f8..15734734 100644 --- a/print-bgp.c +++ b/print-bgp.c @@ -380,6 +380,8 @@ static const struct tok bgp_aigp_values[] = { #define SAFNUM_VPLS 65 /* RFC6037 */ #define SAFNUM_MDT 66 +/* RFC7432 */ +#define SAFNUM_EVPN 70 /* RFC4364 */ #define SAFNUM_VPNUNICAST 128 /* RFC6513 */ @@ -399,6 +401,7 @@ static const struct tok bgp_safi_values[] = { { SAFNUM_TUNNEL, "Tunnel"}, { SAFNUM_VPLS, "VPLS"}, { SAFNUM_MDT, "MDT"}, + { SAFNUM_EVPN, "EVPN"}, { SAFNUM_VPNUNICAST, "labeled VPN Unicast"}, { SAFNUM_VPNMULTICAST, "labeled VPN Multicast"}, { SAFNUM_VPNUNIMULTICAST, "labeled VPN Unicast+Multicast"}, diff --git a/tests/TESTLIST b/tests/TESTLIST index a5ef8141..68467bf6 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -30,6 +30,7 @@ bgp-addpath bgp-addpath.pcap bgp-addpath.out -v 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 # Broadcom tag tests brcmtag brcm-tag.pcap brcm-tag.out diff --git a/tests/bgp-evpn.out b/tests/bgp-evpn.out new file mode 100644 index 00000000..b961d684 --- /dev/null +++ b/tests/bgp-evpn.out @@ -0,0 +1,24 @@ + 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 + Unknown (71), length: 0 + no decoder for Capability 71 diff --git a/tests/bgp-evpn.pcap b/tests/bgp-evpn.pcap new file mode 100644 index 0000000000000000000000000000000000000000..92763529f768761b4a25e486a82a7c1ce213227c GIT binary patch literal 181 zcmca|c+)~A1{MYcU}0bca(3+ti|x72z|ae1gD?{t7vKLcVDfV#!vS#)2G;`&)xW+o zF#KoRx|<0In1O&{^SwF3pXQwYu5qWhLBfH-251x`BL`Q*gdf|0c7Gs)W84~XJBG+U~;HnVsiw#^6v{KCU*t^