]> git.gsnw.org Git - fping.git/commitdiff
adjust generator limit to allow an IPv4 /15
authorErik Auerswald <auerswal@unix-ag.uni-kl.de>
Sun, 7 Jul 2024 15:36:04 +0000 (17:36 +0200)
committerErik Auerswald <auerswal@unix-ag.uni-kl.de>
Fri, 12 Jul 2024 16:19:39 +0000 (18:19 +0200)
doc/fping.pod
src/fping.c

index 7d20d3914fbc6749cfcabb793749b1159840f84a..3fd73322fbe841b534410831d11ddd678a5fb94e 100644 (file)
@@ -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:
index ddffb287431af19807c8c9edfc1274f69580e83d..f7fe6a94503a916be184b718600dd75151c0a371 100644 (file)
@@ -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