Matching IPv6 addresses with $HTTP["remoteip"]
$HTTP["remoteip"] doesn't match on IPv6 addresses.
It may also be useful for it to match v6-mapped IPv4 addresses.
I supplied a patch to do both in #385, but was asked to open a new bug.
I understand that the preferred configuration is to use
bindv6only, but some installments (not mine) may be stuck with v6-mapped addresses so silently matching them with dotted-quad addresses may come handy to those people.
The attached patch lacks MS-Windows support.
Updated by ef over 6 years ago
Would you provide a link or two
I don't understand. A link to what?
or a quick explanation why?
Because I don't know how to write that support.
#ifdef __WIN32 in the code and the true branch uses some
inet_addr() function (while the false branch used
inet_aton() and now uses
I have no idea how to parse (nor any chance to test) network addresses on MS-Windows.
Also available in: Atom