mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-27 03:53:53 +08:00
OLSR: Print the protocol name even if the packet is invalid
This commit is contained in:
parent
db3c742cd7
commit
b0910795a9
@ -322,6 +322,9 @@ olsr_print(netdissect_options *ndo,
|
||||
ndo->ndo_protocol = "olsr";
|
||||
tptr = pptr;
|
||||
|
||||
nd_print_protocol_caps(ndo);
|
||||
ND_PRINT("v%u", (is_ipv6) ? 6 : 4);
|
||||
|
||||
if (length < sizeof(struct olsr_common)) {
|
||||
ND_PRINT(" (packet length < %zu)", sizeof(struct olsr_common));
|
||||
goto invalid;
|
||||
@ -330,8 +333,7 @@ olsr_print(netdissect_options *ndo,
|
||||
ptr.common = (const struct olsr_common *)tptr;
|
||||
length = ND_MIN(length, GET_BE_U_2(ptr.common->packet_len));
|
||||
|
||||
ND_PRINT("OLSRv%i, seq 0x%04x, length %u",
|
||||
(is_ipv6 == 0) ? 4 : 6,
|
||||
ND_PRINT(", seq 0x%04x, length %u",
|
||||
GET_BE_U_2(ptr.common->packet_seq),
|
||||
length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user