diff options
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 5fb9c364..fe1f9eef 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -463,13 +463,13 @@ main(int argc, char **argv) | |||
463 | case 'b': | 463 | case 'b': |
464 | size = strtol(optarg,NULL,0); | 464 | size = strtol(optarg,NULL,0); |
465 | if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) && | 465 | if (size >= (sizeof(struct icmp) + sizeof(struct icmp_ping_data)) && |
466 | size <= MAX_PING_DATA + ICMP_MINLEN) { | 466 | size < MAX_PING_DATA) { |
467 | icmp_pkt_size = size; | 467 | icmp_data_size = size; |
468 | icmp_data_size = icmp_pkt_size - ICMP_MINLEN; | 468 | icmp_pkt_size = size + ICMP_MINLEN; |
469 | } else | 469 | } else |
470 | usage_va("ICMP packet size must be between: %d and %d", | 470 | usage_va("ICMP data length must be between: %d and %d", |
471 | sizeof(struct icmp) + sizeof(struct icmp_ping_data), | 471 | sizeof(struct icmp) + sizeof(struct icmp_ping_data), |
472 | MAX_PING_DATA + ICMP_MINLEN); | 472 | MAX_PING_DATA - 1); |
473 | 473 | ||
474 | break; | 474 | break; |
475 | case 'i': | 475 | case 'i': |
@@ -1301,8 +1301,8 @@ print_help(void) | |||
1301 | printf (" %s",_("timeout value (seconds, currently ")); | 1301 | printf (" %s",_("timeout value (seconds, currently ")); |
1302 | printf ("%u)\n", timeout); | 1302 | printf ("%u)\n", timeout); |
1303 | printf (" %s\n", "-b"); | 1303 | printf (" %s\n", "-b"); |
1304 | printf (" %s", _("icmp packet size (bytes, currently ")); | 1304 | printf (" %s\n", _("Number of icmp data bytes to send")); |
1305 | printf ("%u)\n", icmp_pkt_size); | 1305 | printf (" %s %u + %d)\n", _("Packet size will be data bytes + icmp header (currently"),icmp_data_size, ICMP_MINLEN); |
1306 | printf (" %s\n", "-v"); | 1306 | printf (" %s\n", "-v"); |
1307 | printf (" %s\n", _("verbose")); | 1307 | printf (" %s\n", _("verbose")); |
1308 | 1308 | ||