mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 02:37:15 +00:00
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")
This commit is contained in:
parent
76fc279f1b
commit
9f2cddd261
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue