]> 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)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 6 Feb 2022 19:55:05 +0000 (20:55 +0100)
[skip ci]

print-icmp6.c

index 021d21461e68f8d06f6861ccdcff294985cbbd7a..015d503aee2eab7a7754d9e3c8d4e0a4040cb802 100644 (file)
@@ -1502,7 +1502,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)));