Project:Restrict Login or Role Access by IP Address
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:major
Assigned:james_g
Status:active

Issue Summary

On examining the code I noticed this module is IPv4 only by the way the IP addresses are checked.

Comments

#1

Whenever I become a maintainer, I would be happy to fix this.

#2

Category:bug report» task

#3

Priority:normal» major

#4

Assigned to:Anonymous» james_g

IPv6 support will be added with a D7 version and backported to the 6.x-3.x branch.

#5

Here is a patch to 6.x-2.x-dev to enable IPv6 support:

http://www.convergence.cx/scripts/restrict_by_ip.module.ipv6.patch

I'm using this happily on a large, production site (which happens to be PHP 5.3.2 )

#6

Has anyone else tested this patch?

#7

Didn't test it, just wondering if the IPv4/ IPv6 validation could be replaced by just

function _validate_address($ip) {
return is_string(inet_pton($ip));
}