add extended functions to test IP ranges
This PR fixes #2903 (closed) by providing two new functions
- ipInNetwork:
ipInNetwork($ENV{REMOTE_ADDR}, '127.0.0.0/8')
ipInNetwork($ENV{REMOTE_ADDR}, '10.0.0.0/8', '192.168.0.0/16')
- inNetwork (same but implicitely tests REMOTE_ADDR):
inNetwork('127.0.0.0/8')
inNetwork('10.0.0.0/8', '192.168.0.0/16')
New dependency: Net::CIDR (found in Debian and EPEL)
works in Safe Jail
maybe we should deprecate isInNet6 ?