diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2014-04-23 09:16:12 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2014-04-23 09:16:12 +0000 |
commit | 227d0c8c74600930d72cb2e24e2ca8643a07f055 (patch) | |
tree | c422b36ebd7dc8e48a242f112b0256f91822a440 /usr.sbin | |
parent | da2159b0dff94e273d026edc4db0ee99e484b1cd (diff) |
No need to set protocol in hints.
OK benno@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 4 | ||||
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.c | 4 |
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)); |