adjust generator limit to allow an IPv4 /15

pull/334/head
Erik Auerswald 4 months ago
parent a1509c1b4d
commit 00d6417104

@ -295,7 +295,8 @@ line arguments, and 4 for a system call failure.
=head1 RESTRICTIONS =head1 RESTRICTIONS
The number of addresses that can be generated using the C<-g>, C<--generate> 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 If fping was configured with C<--enable-safe-limits>, the following values are
not allowed for non-root users: not allowed for non-root users:

@ -139,7 +139,7 @@ extern int h_errno;
#define SIZE_ICMP_HDR 8 /* from ip_icmp.h */ #define SIZE_ICMP_HDR 8 /* from ip_icmp.h */
#define MAX_PING_DATA (MAX_IP_PACKET - SIZE_IP_HDR - SIZE_ICMP_HDR) #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 */ /* sized so as to be like traditional ping */
#define DEFAULT_PING_DATA_SIZE 56 #define DEFAULT_PING_DATA_SIZE 56

Loading…
Cancel
Save