X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/d739da09bc2eba15b2659109c2d0b282fee23eae..95eb1b3c936a2cb585f5ca16a76a8e05f83fea87:/print-ospf.c diff --git a/print-ospf.c b/print-ospf.c index 0e84e584..4c09912a 100644 --- a/print-ospf.c +++ b/print-ospf.c @@ -21,6 +21,8 @@ * OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu) */ +/* \summary: Open Shortest Path First (OSPF) printer */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -704,7 +706,7 @@ ospf_print_lsa(netdissect_options *ndo, while ((const u_char *)lp < ls_end) { register uint32_t ul; - ND_TCHECK(*lp); + ND_TCHECK_32BITS(lp); ul = EXTRACT_32BITS(lp); topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS; ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d", @@ -721,7 +723,7 @@ ospf_print_lsa(netdissect_options *ndo, while ((const u_char *)lp < ls_end) { register uint32_t ul; - ND_TCHECK(*lp); + ND_TCHECK_32BITS(lp); ul = EXTRACT_32BITS(lp); topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS; ND_PRINT((ndo, "\n\t\ttopology %s (%u) metric %d", @@ -994,6 +996,7 @@ ospf_decode_v2(netdissect_options *ndo, break; case OSPF_TYPE_HELLO: + ND_TCHECK(op->ospf_hello.hello_options); ND_PRINT((ndo, "\n\tOptions [%s]", bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options)));