artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42a1dd2
)
A ttl of 0 is valid. While here use MAXTTL instead of 255.
author
florian
<florian@openbsd.org>
Sat, 2 May 2015 17:16:07 +0000
(17:16 +0000)
committer
florian
<florian@openbsd.org>
Sat, 2 May 2015 17:16:07 +0000
(17:16 +0000)
Input bluhm@, OK krw@
sbin/ping/ping.c
patch
|
blob
|
history
diff --git
a/sbin/ping/ping.c
b/sbin/ping/ping.c
index
766bce7
..
3fe66d6
100644
(file)
--- a/
sbin/ping/ping.c
+++ b/
sbin/ping/ping.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: ping.c,v 1.12
1 2015/04/20 00:36:51 dlg Exp $
*/
+/* $OpenBSD: ping.c,v 1.12
2 2015/05/02 17:16:07 florian Exp $
*/
/* $NetBSD: ping.c,v 1.20 1995/08/11 22:37:58 cgd Exp $ */
/*
@@
-317,7
+317,7
@@
main(int argc, char *argv[])
#endif /* SMALL */
case 't':
options |= F_TTL;
- ttl =
(u_char)strtonum(optarg, 1, 255
, &errstr);
+ ttl =
strtonum(optarg, 0, MAXTTL
, &errstr);
if (errstr)
errx(1, "ttl value is %s: %s", errstr, optarg);
break;