FreeBSD Bugzilla – Attachment 175678 Details for
Bug 213423
[PATCH] update tcpdump to decode Large BGP Communities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for contrib/tcpdump/print-bgp.c to decode Large BGP Communities
tcpdump-print-bgp-large-community.patch (text/plain), 1.39 KB, created by
Job Snijders
on 2016-10-12 19:43:10 UTC
(
hide
)
Description:
Patch for contrib/tcpdump/print-bgp.c to decode Large BGP Communities
Filename:
MIME Type:
Creator:
Job Snijders
Created:
2016-10-12 19:43:10 UTC
Size:
1.39 KB
patch
obsolete
>--- print-bgp.c 2016-10-12 21:27:08.000000000 +0200 >+++ print-bgp-large.c 2016-10-12 21:26:01.000000000 +0200 >@@ -132,6 +132,7 @@ > #define BGPTYPE_AS4_PATH 17 /* RFC4893 */ > #define BGPTYPE_AGGREGATOR4 18 /* RFC4893 */ > #define BGPTYPE_PMSI_TUNNEL 22 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */ >+#define BGPTYPE_LARGE_COMMUNITIES 30 /* draft-ietf-idr-large-community */ > #define BGPTYPE_ATTR_SET 128 /* draft-marques-ppvpn-ibgp */ > > #define BGP_MP_NLRI_MINSIZE 3 /* End of RIB Marker detection */ >@@ -157,6 +158,7 @@ > { BGPTYPE_EXTD_COMMUNITIES, "Extended Community"}, > { BGPTYPE_PMSI_TUNNEL, "PMSI Tunnel"}, > { BGPTYPE_ATTR_SET, "Attribute Set"}, >+ { BGPTYPE_LARGE_COMMUNITIES, "Large Community"}, > { 255, "Reserved for development"}, > { 0, NULL} > }; >@@ -1462,6 +1464,22 @@ > tptr +=4; > } > break; >+ case BGPTYPE_LARGE_COMMUNITIES: >+ if (len == 0 || len % 12) { >+ ND_PRINT((ndo, "invalid len")); >+ break; >+ } >+ while (tlen>0) { >+ ND_TCHECK2(tptr[0], 12); >+ ND_PRINT((ndo, "%u:%u:%u%s", >+ EXTRACT_32BITS(tptr), >+ EXTRACT_32BITS(tptr + 4), >+ EXTRACT_32BITS(tptr + 8), >+ (tlen>12) ? ", " : "")); >+ tlen -= 12; >+ tptr += 12; >+ } >+ break; > case BGPTYPE_ORIGINATOR_ID: > if (len != 4) { > ND_PRINT((ndo, "invalid len"));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 213423
: 175678