]> The Tcpdump Group git mirrors - tcpdump/commitdiff
OSPFv3: More nd_ipv6-ification
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 31 Jan 2018 17:59:13 +0000 (18:59 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 31 Jan 2018 19:40:45 +0000 (20:40 +0100)
print-ospf6.c

index e115d8e8d09268e37ff816fb0f97e70f8e4f8be2..0ca3dbd999dfce054ae0a46f625e2173eb72f1c8 100644 (file)
@@ -412,7 +412,7 @@ ospf6_print_lsaprefix(netdissect_options *ndo,
 {
        const struct lsa6_prefix *lsapp = (const struct lsa6_prefix *)tptr;
        u_int wordlen;
-       struct in6_addr prefix;
+       nd_ipv6 prefix;
 
        if (lsa_length < sizeof (*lsapp) - IPV6_ADDR_LEN_BYTES)
                goto trunc;
@@ -427,10 +427,10 @@ ospf6_print_lsaprefix(netdissect_options *ndo,
                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);
-       ND_PRINT("\n\t\t%s/%u", ip6addr_string(ndo, (const u_char *)&prefix),
-               EXTRACT_U_1(lsapp->lsa_p_len));
+       memset(prefix, 0, sizeof(prefix));
+       memcpy(prefix, lsapp->lsa_p_prefix, wordlen * 4);
+       ND_PRINT("\n\t\t%s/%u", ip6addr_string(ndo, prefix),
+                EXTRACT_U_1(lsapp->lsa_p_len));
         if (EXTRACT_U_1(lsapp->lsa_p_opt)) {
             ND_PRINT(", Options [%s]",
                    bittok2str(ospf6_lsa_prefix_option_values,