]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ospf6.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-ospf6.c
index 1b862b3041aa307bcd10ba51d41b6d98e6fa109f..49167954e20c77cb0c10a1f8c861ffeaff94293c 100644 (file)
@@ -381,7 +381,7 @@ ospf6_print_ls_type(netdissect_options *ndo,
                ls_type & LS_TYPE_MASK,
                tok2str(ospf6_ls_scope_values, "Unknown", ls_type & LS_SCOPE_MASK),
                ls_type &0x8000 ? ", transitive" : "", /* U-bit */
-               GET_IPADDR_STRING((const u_char *)ls_stateid));
+               GET_IPADDR_STRING(ls_stateid));
 }
 
 static int
@@ -425,9 +425,8 @@ ospf6_print_lsaprefix(netdissect_options *ndo,
        if (lsa_length < wordlen * 4)
                goto trunc;
        lsa_length -= wordlen * 4;
-       ND_TCHECK_LEN(lsapp->lsa_p_prefix, wordlen * 4);
        memset(prefix, 0, sizeof(prefix));
-       memcpy(prefix, lsapp->lsa_p_prefix, wordlen * 4);
+       GET_CPY_BYTES(prefix, lsapp->lsa_p_prefix, wordlen * 4);
        ND_PRINT("\n\t\t%s/%u", ip6addr_string(ndo, prefix), /* local buffer, not packet data; don't use GET_IP6ADDR_STRING() */
                 GET_U_1(lsapp->lsa_p_len));
         if (GET_U_1(lsapp->lsa_p_opt)) {
@@ -553,8 +552,7 @@ ospf6_print_lsa(netdissect_options *ndo,
                        if (lsa_length < sizeof (*ap))
                                return (1);
                        lsa_length -= sizeof (*ap);
-                       ND_TCHECK_SIZE(ap);
-                       ND_PRINT("\n\t\t%s", GET_IPADDR_STRING(*ap));
+                       ND_PRINT("\n\t\t%s", GET_IPADDR_STRING(ap));
                        ++ap;
                }
                break;
@@ -763,8 +761,7 @@ ospf6_decode_v3(netdissect_options *ndo,
                        ND_PRINT("\n\t  Neighbor List:");
                        ap = hellop->hello_neighbor;
                        while ((const u_char *)ap < dataend) {
-                               ND_TCHECK_SIZE(ap);
-                               ND_PRINT("\n\t    %s", GET_IPADDR_STRING(*ap));
+                               ND_PRINT("\n\t    %s", GET_IPADDR_STRING(ap));
                                ++ap;
                        }
                }