Skip to content

add extended functions to test IP ranges

Maxime Besson requested to merge fix-cidr-match-2903 into v2.0

This PR fixes #2903 (closed) by providing two new functions

  • ipInNetwork:
   ipInNetwork($ENV{REMOTE_ADDR}, '')
   ipInNetwork($ENV{REMOTE_ADDR}, '', '')
  • inNetwork (same but implicitely tests REMOTE_ADDR):
   inNetwork('', '')

New dependency: Net::CIDR (found in Debian and EPEL)

works in Safe Jail

maybe we should deprecate isInNet6 ?

Merge request reports