If I add a new mirror which has 1 IPv4 and 1 IPv6 address, I am told:
Warning: the hostname returned more than one address! This is highly unreliable.
Warning: unable to guess the geographic location of willthompson.co.uk
Mirror added successfully
This server is in a data centre in central Manchester. It's true that the v4 and v6 databases contain different information; the v4 information is almost correct whereas the v6 information puts it somewhere in a field 40km north:
$ geoiplookup willthompson.co.uk
GeoIP Country Edition: GB, United Kingdom
GeoIP City Edition, Rev 1: GB, I2, Manchester, Manchester, M40, 53.466301, -2.134200, 0, 0
GeoIP ASNum Edition: AS35425 Bytemark Limited
$ geoiplookup6 willthompson.co.uk
GeoIP Country V6 Edition: GB, United Kingdom
GeoIP ASNum V6 Edition: AS35425 Bytemark Limited
GeoIP City Edition V6, Rev 1: GB, N/A, N/A, N/A, 54.000000, -2.000000, 0, 0
In my brief testing this seems to be true in general: IPv4 geoip results are pretty accurate, whereas IPv6 results are just "middle of the country".
I think it would be kinder to treat this case specially, something like this:
Fetch IPs, fail if 0 are returned
Partition the IP addresses into v4 and v6
If the v4 set has 1 IP, use that
If the v4 set has >1 IP, fail
If the v4 set has 0 IPs, then check the v6 set with similar logic
Never mind. I see now that the 0th address is already used. I was confusing this error message with the problem fixed by 03a4e02214bdb7bb60240ddf25b887ccac5fb118.
If I add a new mirror which has 1 IPv4 and 1 IPv6 address, I am told:
This server is in a data centre in central Manchester. It's true that the v4 and v6 databases contain different information; the v4 information is almost correct whereas the v6 information puts it somewhere in a field 40km north:
In my brief testing this seems to be true in general: IPv4 geoip results are pretty accurate, whereas IPv6 results are just "middle of the country".
I think it would be kinder to treat this case specially, something like this: