]> The Tcpdump Group git mirrors - tcpdump/commitdiff
ICMPv6: Add a comment about "don't use GET_IP6ADDR_STRING()"
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 6 Feb 2022 19:54:50 +0000 (20:54 +0100)
committerGuy Harris <[email protected]>
Sun, 17 Jul 2022 05:29:12 +0000 (22:29 -0700)
[skip ci]

(cherry picked from commit b34f18bdffd263ae544e370c048238a90179e877)

print-icmp6.c

index 0ba65690147a303025a084600462cbce79b79240..f380be20ccedf90799dbc583fa402f33e421582d 100644 (file)
@@ -1520,7 +1520,7 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid)
                        default:
                                goto trunc;
                        }
-                       ND_PRINT(" %s/%u", ip6addr_string(ndo, (const u_char *)&in6),
+                       ND_PRINT(" %s/%u", ip6addr_string(ndo, (const u_char *)&in6), /* local buffer, not packet data; don't use GET_IP6ADDR_STRING() */
                                   GET_U_1(opri->nd_opt_rti_prefixlen));
                        ND_PRINT(", pref=%s",
                                 get_rtpref(GET_U_1(opri->nd_opt_rti_flags)));