@@ -139,6 +139,7 @@ struct bgp_route_refresh {
139
139
#define BGPTYPE_AIGP 26 /* RFC7311 */
140
140
#define BGPTYPE_PE_DISTINGUISHER_LABEL 27 /* RFC6514 */
141
141
#define BGPTYPE_ENTROPY_LABEL 28 /* RFC6790 */
142
+ #define BGPTYPE_LARGE_COMMUNITY 30 /* draft-ietf-idr-large-community-02 */
142
143
#define BGPTYPE_ATTR_SET 128 /* RFC6368 */
143
144
144
145
#define BGP_MP_NLRI_MINSIZE 3 /* End of RIB Marker detection */
@@ -169,6 +170,7 @@ static const struct tok bgp_attr_values[] = {
169
170
{ BGPTYPE_AIGP , "Accumulated IGP Metric" },
170
171
{ BGPTYPE_PE_DISTINGUISHER_LABEL , "PE Distinguisher Label" },
171
172
{ BGPTYPE_ENTROPY_LABEL , "Entropy Label" },
173
+ { BGPTYPE_LARGE_COMMUNITY , "Large Community" },
172
174
{ BGPTYPE_ATTR_SET , "Attribute Set" },
173
175
{ 255 , "Reserved for development" },
174
176
{ 0 , NULL }
@@ -201,7 +203,6 @@ static const struct tok bgp_as_path_segment_close_values[] = {
201
203
#define BGP_OPT_AUTH 1
202
204
#define BGP_OPT_CAP 2
203
205
204
-
205
206
static const struct tok bgp_opt_values [] = {
206
207
{ BGP_OPT_AUTH , "Authentication Information" },
207
208
{ BGP_OPT_CAP , "Capabilities Advertisement" },
@@ -355,7 +356,6 @@ static const struct tok bgp_aigp_values[] = {
355
356
{ 0 , NULL }
356
357
};
357
358
358
-
359
359
/* Subsequent address family identifier, RFC2283 section 7 */
360
360
#define SAFNUM_RES 0
361
361
#define SAFNUM_UNICAST 1
@@ -430,7 +430,6 @@ static const struct tok bgp_safi_values[] = {
430
430
#define BGP_EXT_COM_L2VPN_RT_0 0x000a /* L2VPN Identifier,Format AS(2bytes):AN(4bytes) */
431
431
#define BGP_EXT_COM_L2VPN_RT_1 0xF10a /* L2VPN Identifier,Format IP address:AN(2bytes) */
432
432
433
-
434
433
/* http://www.cisco.com/en/US/tech/tk436/tk428/technologies_tech_note09186a00801eb09a.shtml */
435
434
#define BGP_EXT_COM_EIGRP_GEN 0x8800
436
435
#define BGP_EXT_COM_EIGRP_METRIC_AS_DELAY 0x8801
@@ -707,7 +706,6 @@ bgp_vpn_sg_print(netdissect_options *ndo,
707
706
return (total_length );
708
707
}
709
708
710
-
711
709
/* RDs and RTs share the same semantics
712
710
* we use bgp_vpn_rd_print for
713
711
* printing route targets inside a NLRI */
@@ -1374,7 +1372,6 @@ bgp_attr_print(netdissect_options *ndo,
1374
1372
}
1375
1373
break ;
1376
1374
1377
-
1378
1375
/*
1379
1376
* Process AS4 byte path and AS2 byte path attributes here.
1380
1377
*/
@@ -2191,7 +2188,6 @@ bgp_attr_print(netdissect_options *ndo,
2191
2188
tok2str (bgp_aigp_values , "Unknown" , type ),
2192
2189
type , length ));
2193
2190
2194
-
2195
2191
/*
2196
2192
* Check if we can read the TLV data.
2197
2193
*/
@@ -2267,7 +2263,23 @@ bgp_attr_print(netdissect_options *ndo,
2267
2263
}
2268
2264
break ;
2269
2265
2270
-
2266
+ case BGPTYPE_LARGE_COMMUNITY :
2267
+ if (len == 0 || len % 12 ) {
2268
+ ND_PRINT ((ndo , "invalid len" ));
2269
+ break ;
2270
+ }
2271
+ ND_PRINT ((ndo , "\n\t " ));
2272
+ while (len > 0 ) {
2273
+ ND_TCHECK2 (* tptr , 12 );
2274
+ ND_PRINT ((ndo , "%u:%u:%u%s" ,
2275
+ EXTRACT_32BITS (tptr ),
2276
+ EXTRACT_32BITS (tptr + 4 ),
2277
+ EXTRACT_32BITS (tptr + 8 ),
2278
+ (len > 12 ) ? ", " : "" ));
2279
+ tptr += 12 ;
2280
+ len -= 12 ;
2281
+ }
2282
+ break ;
2271
2283
default :
2272
2284
ND_TCHECK2 (* pptr ,len );
2273
2285
ND_PRINT ((ndo , "\n\t no Attribute %u decoder" , atype )); /* we have no decoder for the attribute */
0 commit comments