]> The Tcpdump Group git mirrors - tcpdump/commit
OSPF: Modernize some code.
authorDenis Ovsienko <[email protected]>
Tue, 6 Oct 2020 19:58:16 +0000 (20:58 +0100)
committerDenis Ovsienko <[email protected]>
Tue, 6 Oct 2020 20:01:05 +0000 (21:01 +0100)
commitca0cfa4f8e014198ad9e1f64b24762ce7366d5b2
treea6e8fbc7170984653785b472cb67c2d985628d05
parent1c75daed55fcbff08e460b97605701ab0115f50b
OSPF: Modernize some code.

Make a few one-byte fetches use GET_U_1().

In ospf_print_tos_metrics() lose an excess ND_TCHECK_SIZE() and make the
function void.

Make ospf_decode_lls() void -- the only case when it returned a non-zero
value was if the LLS block is invalid, and it already signals that with a
message. It is a separate matter if the invalid packet is also truncated,
and since there is no proper check for that, just return without printing
a misleading message.

Switch ospf_print() to nd_trunc_longjmp().
print-ospf.c