File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 66Given a list of IP address ranges, minify that list to the smallest possible size by performing the following
77optimizations:
88
9- - removing duplicate IP ranges from the list
9+ - removing invalid IP addresses/ranges from the list
10+ - removing duplicates
1011- removing IP ranges already covered by larger ranges in the list
1112- merging adjacent IP ranges into larger, contiguous blocks
1213
Original file line number Diff line number Diff line change @@ -34,8 +34,7 @@ protected function parseOrFail(string $cidrNotation): void
3434 $ onlyIp = filter_var (trim ($ cidrNotation ), FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 );
3535
3636 if ($ onlyIp ) {
37- $ this ->prefix = $ onlyIp ;
38- $ this ->length = 32 ;
37+ $ this ->parseOrFail ($ onlyIp . '/32 ' );
3938 return ;
4039 }
4140
You can’t perform that action at this time.
0 commit comments