diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-01-21 08:51:23 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2003-01-21 08:51:23 +0000 |
commit | fa0dbccf9026359f9f05ae8ade01aee046399afe (patch) | |
tree | 796c7d937afa55ef6037002050cdd396fae497cb | |
parent | f99af9b0d2050135e3cfcb0b1f2e6d02919970fb (diff) |
getting sysctl(net.inet6.ip6.def_hlim) need int variable, not u_long
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 144f710bb2c..168a490e680 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute6.c,v 1.32 2003/01/21 08:00:08 itojun Exp $ */ +/* $OpenBSD: traceroute6.c,v 1.33 2003/01/21 08:51:22 itojun Exp $ */ /* $KAME: traceroute6.c,v 1.63 2002/10/24 12:53:25 itojun Exp $ */ /* @@ -370,7 +370,7 @@ main(argc, argv) char hbuf[NI_MAXHOST], src0[NI_MAXHOST]; char *ep; int mib[4] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_DEFHLIM }; - size_t size = sizeof(max_hops); + size_t size; u_long lport; int minlen; @@ -386,8 +386,9 @@ main(argc, argv) seteuid(getuid()); setuid(getuid()); - (void) sysctl(mib, sizeof(mib)/sizeof(mib[0]), &max_hops, &size, - NULL, 0); + size = sizeof(i); + (void) sysctl(mib, sizeof(mib)/sizeof(mib[0]), &i, &size, NULL, 0); + max_hops = i; /* set a minimum set of socket options */ on = 1; |