diff --git a/doc/fping.pod b/doc/fping.pod index 7d20d39..3fd7332 100644 --- a/doc/fping.pod +++ b/doc/fping.pod @@ -295,7 +295,8 @@ line arguments, and 4 for a system call failure. =head1 RESTRICTIONS The number of addresses that can be generated using the C<-g>, C<--generate> -option is limited to 100000. +option is limited to 131070 (the number of host addresses in one 15-bit IPv4 +prefix). If fping was configured with C<--enable-safe-limits>, the following values are not allowed for non-root users: diff --git a/src/fping.c b/src/fping.c index ddffb28..f7fe6a9 100644 --- a/src/fping.c +++ b/src/fping.c @@ -139,7 +139,7 @@ extern int h_errno; #define SIZE_ICMP_HDR 8 /* from ip_icmp.h */ #define MAX_PING_DATA (MAX_IP_PACKET - SIZE_IP_HDR - SIZE_ICMP_HDR) -#define MAX_GENERATE 100000 /* maximum number of hosts that -g can generate */ +#define MAX_GENERATE 131070 /* maximum number of hosts that -g can generate */ /* sized so as to be like traditional ping */ #define DEFAULT_PING_DATA_SIZE 56