summaryrefslogtreecommitdiffstats
path: root/sbin/ping/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ping/ping.c')
-rw-r--r--sbin/ping/ping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c
index 90c0b8a..2923cd3 100644
--- a/sbin/ping/ping.c
+++ b/sbin/ping/ping.c
@@ -324,7 +324,7 @@ main(argc, argv)
break;
case 'm': /* TTL */
ultmp = strtoul(optarg, &ep, 0);
- if (*ep || ep == optarg || ultmp > 255)
+ if (*ep || ep == optarg || ultmp > MAXTTL)
errx(EX_USAGE, "invalid TTL: `%s'", optarg);
ttl = ultmp;
options |= F_TTL;
@@ -381,7 +381,7 @@ main(argc, argv)
break;
case 'T': /* multicast TTL */
ultmp = strtoul(optarg, &ep, 0);
- if (*ep || ep == optarg || ultmp > 255)
+ if (*ep || ep == optarg || ultmp > MAXTTL)
errx(EX_USAGE, "invalid multicast TTL: `%s'",
optarg);
mttl = ultmp;
OpenPOWER on IntegriCloud