Closed (won't fix)
Project:
Sphinx Search
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Nov 2008 at 19:53 UTC
Updated:
26 Mar 2012 at 11:15 UTC
According to the help text on the Sphinx Search configuration page, "IPv6 addresses are not supported."
This, however, is not correct.
Whether or not ip_address() returns an IPv4 address is contingent upon the IP configuration of the local machine. Mine (Mac OS X using IPv6) returns an IPv6 address.
Conseqently, if the client is using an IPv6 address, you MUST specify the IPv6 address in the Sphinx Search configuration page, otherwise they will not match.
If the above is intended to reflect only CIDR limitations, that should be stated more clearly.
I'm guessing that the documentation is what needs changing, here.
Comments
Comment #1
markus_petrux commentedhmm... good point.
The description now is "You can also specify IP ranges using CIDR notation. IPv6 addresses are not supported.". It could be changed to "You can also specify IPv4 ranges using CIDR notation (not supported for IPv6 addresses)." ¿?
Then, in
sphinxsearch_xmlpipe()we have the following code, that we need to change somehow to parse IPv6 addresses differently. Suggestions?Comment #2
mbutcher commentedPHP doesn't have an equivalent of ip2long for IPv6, so... I guess a full IPv6 CIDR parser and replacement algorithm would be a larger project.
MediaWiki has a nice IP.php class file that might provide a useful starting point for the algorithms:
http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/IP.php?r...
The method to start with would probably be "public static function isInRange( $addr, $range )".
But if the documentation was fixed, I'd certainly suggest lowering the priority on IPv6 support. Unless it's a big need for you (or you'd like the clout of being the first Drupal component to correctly support IPv6), this is obviously less important than other issues.
Comment #3
DerekMorr commentedThere's also the Net_IPv6 module. It has a function which might work - http://pear.php.net/manual/en/package.networking.net-ipv6.isinnetmask.php
Comment #4
markus_petrux commentedI'll soon post a method to invoke the XMLPipe generator from the command line, so it won't be necessary to check for IPs. Please, follow #327816: Ability to execute XMLPipe generator from PHP CLI