X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/db752b7f79065d0d90bec13694af6c2c6e32c5d3..25deea90c2ad85845eeb2227e583ef92ead9147e:/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)));