summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2014-04-23 09:16:11 +0000
committerflorian <florian@openbsd.org>2014-04-23 09:16:11 +0000
commitd9e2558b3e2848aa133300b2aa50c07e8d4b0a5d (patch)
tree925361d1c68f3fd98d72f708dc10c9665af47411
parentzap redundant cast (diff)
downloadwireguard-openbsd-d9e2558b3e2848aa133300b2aa50c07e8d4b0a5d.tar.xz
wireguard-openbsd-d9e2558b3e2848aa133300b2aa50c07e8d4b0a5d.zip
No need to set protocol in hints.
OK benno@
-rw-r--r--usr.sbin/traceroute/traceroute.c4
-rw-r--r--usr.sbin/traceroute6/traceroute6.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index adab2920795..61da6f395a1 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.121 2014/04/23 09:14:49 florian Exp $ */
+/* $OpenBSD: traceroute.c,v 1.122 2014/04/23 09:16:11 florian Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*-
@@ -522,7 +522,7 @@ main(int argc, char *argv[])
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET;
hints.ai_socktype = SOCK_RAW;
- hints.ai_protocol = IPPROTO_ICMP;
+ hints.ai_protocol = 0;
hints.ai_flags = AI_CANONNAME;
if ((error = getaddrinfo(dest, NULL, &hints, &res)))
errx(1, "%s", gai_strerror(error));
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c
index d5908e95d86..3ff95c2cc11 100644
--- a/usr.sbin/traceroute6/traceroute6.c
+++ b/usr.sbin/traceroute6/traceroute6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute6.c,v 1.91 2014/04/23 09:13:00 florian Exp $ */
+/* $OpenBSD: traceroute6.c,v 1.92 2014/04/23 09:16:11 florian Exp $ */
/* $KAME: traceroute6.c,v 1.63 2002/10/24 12:53:25 itojun Exp $ */
/*
@@ -485,7 +485,7 @@ main(int argc, char *argv[])
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
hints.ai_socktype = SOCK_RAW;
- hints.ai_protocol = IPPROTO_ICMPV6;
+ hints.ai_protocol = 0;
hints.ai_flags = AI_CANONNAME;
if ((error = getaddrinfo(*argv, NULL, &hints, &res)))
errx(1, "%s", gai_strerror(error));