ndo->ndo_protocol = "geneve";
ND_PRINT("Geneve");
+ if (len < 8) {
+ ND_PRINT(" [length %u < 8]", len);
+ nd_print_invalid(ndo);
+ return;
+ }
+
ND_TCHECK_8(bp);
ver_opt = GET_U_1(bp);
else
ND_PRINT("\n\t");
- if (ethertype_print(ndo, prot, bp, len, ndo->ndo_snapend - bp, NULL, NULL) == 0) {
+ if (ethertype_print(ndo, prot, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL) == 0) {
if (prot == ETHERTYPE_TEB)
- ether_print(ndo, bp, len, ndo->ndo_snapend - bp, NULL, NULL);
+ ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
else
ND_PRINT("geneve-proto-0x%x", prot);
}