Skip to content

Commit

Permalink
adjust generator limit to allow an IPv4 /15
Browse files Browse the repository at this point in the history
  • Loading branch information
auerswal committed Jul 12, 2024
1 parent a1509c1 commit 00d6417
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/fping.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/fping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 00d6417

Please sign in to comment.