summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2015-05-02 17:19:42 +0000
committerflorian <florian@openbsd.org>2015-05-02 17:19:42 +0000
commit596a2120ef912678e5adf22665e0852fa812039f (patch)
tree6bdf8426f1f1babfd0cb82ac413fb2ef4f50ba6b
parentA ttl of 0 is valid. While here use MAXTTL instead of 255. (diff)
downloadwireguard-openbsd-596a2120ef912678e5adf22665e0852fa812039f.tar.xz
wireguard-openbsd-596a2120ef912678e5adf22665e0852fa812039f.zip
Use IPV6_MAXHLIM instead of 255; pointed out by bluhm@
No object change.
-rw-r--r--sbin/ping6/ping6.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index 3774c996547..397f8daecef 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ping6.c,v 1.107 2015/05/02 00:32:03 krw Exp $ */
+/* $OpenBSD: ping6.c,v 1.108 2015/05/02 17:19:42 florian Exp $ */
/* $KAME: ping6.c,v 1.163 2002/10/25 02:19:06 itojun Exp $ */
/*
@@ -364,7 +364,7 @@ main(int argc, char *argv[])
options |= F_HOSTNAME;
break;
case 'h': /* hoplimit */
- hoplimit = strtonum(optarg, 0, 255, &errstr);
+ hoplimit = strtonum(optarg, 0, IPV6_MAXHLIM, &errstr);
if (errstr)
errx(1, "hoplimit is %s: %s", errstr, optarg);
break;