From: florian Date: Wed, 23 Apr 2014 09:16:11 +0000 (+0000) Subject: No need to set protocol in hints. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d9e2558b3e2848aa133300b2aa50c07e8d4b0a5d;p=openbsd No need to set protocol in hints. OK benno@ --- 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));