X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/60237c7f7e9b0ed63d80ebeb281e85d102f345c3..9beea81f673bd6267a536d9132ca06a3d20a0235:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index ec719494..0e47ef50 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -183,6 +183,8 @@ struct bootp { /* RFC 2610 */ #define TAG_SLP_DA ((uint8_t) 78) #define TAG_SLP_SCOPE ((uint8_t) 79) +/* RFC 8925 */ +#define TAG_IPV6_ONLY_PREFERRED ((uint8_t) 108) /* RFC 2937 */ #define TAG_NS_SEARCH ((uint8_t) 117) /* RFC 3004 - The User Class Option for DHCP */ @@ -530,6 +532,7 @@ static const struct tok tag2str[] = { { TAG_NETINFO_PARENT_TAG, "aNITAG" }, { TAG_URL, "aURL" }, { TAG_MUDURL, "aMUD-URL" }, + { TAG_IPV6_ONLY_PREFERRED, "$IPv6-Only-Preferred" }, { 0, NULL } }; @@ -707,6 +710,14 @@ rfc1048_print(netdissect_options *ndo, case 'p': /* IP address pairs */ + /* this option should be N x 8 bytes long */ + if (len < 8 || len % 8 != 0) { + ND_PRINT("%s[length != N x 8 bytes]", + len == 0 ? " " : ""); + bp += len; + len = 0; + break; + } while (len >= 2*4) { if (!first) ND_PRINT(","); @@ -1049,6 +1060,19 @@ rfc1048_print(netdissect_options *ndo, } break; + case TAG_IPV6_ONLY_PREFERRED: + /* this option should be 4 bytes long */ + if (len != 4) { + ND_PRINT("[length != 4 bytes]"); + nd_print_invalid(ndo); + bp += len; + len = 0; + } + ND_PRINT("%u", GET_BE_U_4(bp)); + bp += 4; + len -= 4; + break; + default: ND_PRINT("[unknown special tag %u, size %u]", tag, len);