Skip to content

Commit b4272b3

Browse files
committed
CDP: Print the protocol name before any check
1 parent c3e2077 commit b4272b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

print-cdp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,13 @@ cdp_print(netdissect_options *ndo,
260260
uint16_t checksum;
261261

262262
ndo->ndo_protocol = "cdp";
263+
nd_print_protocol_caps(ndo);
263264

264265
if (length < CDP_HEADER_LEN) {
265266
ND_PRINT(" (packet length %u < %u)", length, CDP_HEADER_LEN);
266267
goto invalid;
267268
}
268-
ND_PRINT("CDPv%u, ttl: %us",
269+
ND_PRINT("v%u, ttl: %us",
269270
GET_U_1(tptr + CDP_HEADER_VERSION_OFFSET),
270271
GET_U_1(tptr + CDP_HEADER_TTL_OFFSET));
271272
checksum = GET_BE_U_2(tptr + CDP_HEADER_CHECKSUM_OFFSET);

0 commit comments

Comments
 (0)