};
#define BGP_NOTIFICATION_SIZE 21 /* unaligned */
+struct bgp_route_refresh_orf {
+ nd_uint8_t refresh;
+ nd_uint8_t type;
+ nd_uint16_t len;
+};
+
struct bgp_route_refresh {
nd_byte bgp_marker[16];
nd_uint16_t len;
nd_uint8_t subtype;
nd_uint8_t safi;
};
+
+static const struct tok bgp_orf_refresh_type[] = {
+ { 1, "Immediate"},
+ { 2, "Defer"},
+ { 0, NULL }
+};
+
+static const struct tok bgp_orf_type[] = {
+ { 64, "Address Prefix ORF"},
+ { 65, "CP-ORF"},
+ { 0, NULL }
+};
+
#define BGP_ROUTE_REFRESH_SIZE 23
+#define BGP_ROUTE_REFRESH_SIZE_ORF BGP_ROUTE_REFRESH_SIZE + 5
#define BGP_ROUTE_REFRESH_SUBTYPE_NORMAL 0
#define BGP_ROUTE_REFRESH_SUBTYPE_BORR 1
#define BGP_ROUTE_REFRESH_SUBTYPE_EORR 2
{
const struct bgp_route_refresh *bgp_route_refresh_header;
- ND_TCHECK_LEN(pptr, BGP_ROUTE_REFRESH_SIZE);
-
/* some little sanity checking */
if (len<BGP_ROUTE_REFRESH_SIZE)
return;
GET_U_1(bgp_route_refresh_header->subtype)),
GET_U_1(bgp_route_refresh_header->subtype));
+ /* ORF */
+ if (len >= BGP_ROUTE_REFRESH_SIZE_ORF) {
+ const struct bgp_route_refresh_orf *orf_header;
+
+ orf_header =
+ (const struct bgp_route_refresh_orf *)(pptr + BGP_ROUTE_REFRESH_SIZE);
+
+ ND_PRINT("\n\t ORF refresh %s (%u), ORF type %s (%u), ORF length %u",
+ tok2str(bgp_orf_refresh_type, "Unknown",
+ GET_U_1(orf_header->refresh)),
+ GET_U_1(orf_header->refresh),
+ tok2str(bgp_orf_type, "Unknown", GET_U_1(orf_header->type)),
+ GET_U_1(orf_header->type), GET_BE_U_2(orf_header->len));
+ }
+
if (ndo->ndo_vflag > 1) {
ND_TCHECK_LEN(pptr, len);
print_unknown_data(ndo, pptr, "\n\t ", len);
--- /dev/null
+ 1 16:12:16.630159 IP6 (class 0xc0, flowlabel 0x4dfd4, hlim 1, next-header TCP (6) payload length: 111) fe80::a00:27ff:fe5e:d19e.34394 > fe80::ca5d:fd0d:cd8:1bb7.179: Flags [P.], cksum 0xa597 (correct), seq 2096048450:2096048529, ack 1967270673, win 506, options [nop,nop,TS val 2145170888 ecr 3487011352], length 79: BGP
+ Route Refresh Message (5), length: 28
+ AFI IPv4 (1), SAFI Unicast (1), Subtype Normal route refresh request (0)
+ ORF refresh Defer (2), ORF type Address Prefix ORF (64), ORF length 1
+ Route Refresh Message (5), length: 51
+ AFI IPv4 (1), SAFI Unicast (1), Subtype Normal route refresh request (0)
+ ORF refresh Immediate (1), ORF type Address Prefix ORF (64), ORF length 24