@@ -, +, @@ prove t/Koha/Middleware/RealIP.t --- Koha/Middleware/RealIP.pm | 1 + opac/ilsdi.pl | 1 + 2 files changed, 2 insertions(+) --- a/Koha/Middleware/RealIP.pm +++ a/Koha/Middleware/RealIP.pm @@ -109,6 +109,7 @@ sub get_trusted_proxies { my @trusted_proxies_ip = split( / /, $proxies_conf ); my @trusted_proxies = (); foreach my $ip (@trusted_proxies_ip){ + local $Net::Netmask::SHORTNET_DEFAULT = 1; my $mask = Net::Netmask->new2($ip); if ($mask){ push(@trusted_proxies,$mask); --- a/opac/ilsdi.pl +++ a/opac/ilsdi.pl @@ -168,6 +168,7 @@ my @AuthorizedIPs = split( /,/, C4::Context->preference('ILS-DI:AuthorizedIPs') if (@AuthorizedIPs) { # If no filter set, allow access to everybody my $authorized = 0; foreach my $ip (@AuthorizedIPs) { + local $Net::Netmask::SHORTNET_DEFAULT = 1; my $netmask = Net::Netmask->new2($ip); if ( $netmask && $netmask->match( $ENV{REMOTE_ADDR} ) ) { $authorized = 1; --