Closed (fixed)
Project:
Restrict Login or Role Access by IP Address
Version:
8.x-4.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Feb 2010 at 11:17 UTC
Updated:
22 Jul 2025 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
panthar commentedWhenever I become a maintainer, I would be happy to fix this.
Comment #2
panthar commentedComment #3
panthar commentedComment #4
james.wilson commentedIPv6 support will be added with a D7 version and backported to the 6.x-3.x branch.
Comment #5
lochii commentedHere 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 )
Comment #6
panthar commentedHas anyone else tested this patch?
Comment #7
bart.hanssens commentedDidn'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));
}
Comment #8
geodaniel commentedComment #9
panthar commentedya problem for me is, I don't really understand ipv6 to know what will work/does not work.
Comment #10
rocketeerbkw commentedJust uploading the patch from #5.
Comment #11
rocketeerbkw commentedComment #12
tcorneli commentedNew patch for latest dev. Thanks to @lochii for previous patch.
Comment #13
tcorneli commentedSorry, previous patch contained error.
Comment #14
tcorneli commentedThis patch fixes the issue where IPv6 wasn't validated correctly.
Comment #15
tcorneli commentedComment #16
darvanenAgree this is vaulable, just needs tests to make it part of the module.
Comment #18
darvanenThis change is badly needed for the test suite to run green because gitlab CI uses IPv6 in Functional tests, however, it is currently failing at the Unit test:
Comment #19
darvanenSeems Symfony's IPUtils doesn't check for valid CIDR ranges so that had to be put back in for IPv4 addresses.
I will admit I asked Junie (AI) to add some IPv6 testing data to the Unit test but I have looked them over and they seem right to me.
All tests are passing both locally and in the CI.
I'll leave this a short while for review and if there are no comments I'll commit it.
Comment #21
darvanenI think that's long enough :)