From 9f2cddd261d09b736893454cb8b7aa0651ac5211 Mon Sep 17 00:00:00 2001 From: "R. Christian McDonald" Date: Tue, 8 Aug 2023 14:40:02 -0400 Subject: [PATCH] ping: use the in6_addr buffer when parsing src address as AF_INET6 Reviewed by: kp MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/ping/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 2f94b5d3227..bfe19e0ff44 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -102,7 +102,7 @@ main(int argc, char *argv[]) */ if (inet_pton(AF_INET, optarg, &a) == 1) ipv4 = true; - else if (inet_pton(AF_INET6, optarg, &a) == 1) + else if (inet_pton(AF_INET6, optarg, &a6) == 1) ipv6 = true; break; #endif