Carlos E. R. wrote:
El 2016-09-12 a las 08:53 +0200, Per Jessen escribió:
Carlos E. R. wrote:
Maybe when I said "I'm given an IPv6 address" we got a confusion. I mean that I get a response from some service that I have to contact that address to download some file or something. Not that the ISP gives my router an address to use as its own. Sorry.
Okay, I understand. So the resolver gives you an IPv6 address, yes that working is as designed. Unless a service is IPv6-only it is still not a problem. Unless your PC thinks it has IPv6 connecitivity.
I have a similar "issue" on a Leap422 test-desktop. It only has IPv6, no IPv4. The resolver keeps giving me IPv4 addresses for services that have no IPv6 address. :-)
Correction - on an IPv6-only system: if a host has both ipv4 and ipv6 addresses, I get only the ipv6 addresses. if a host has only ipv6 addresses, I only get the ipv6 addresses. if a host has only ipv4 addresses, I only get the ipv4 address mapped as ipv6. All perfectly fine.
Yes, that's the reverse issue of mine. My PC has some IPv6 connectivity, with local machines. Just no internet.
Carlos, what exactly is "some IPv6 connectivity"? If it is any more than link-local addresses, your system will believe you're on IPv6. The order in which addresses are returned by e.g. getaddrinfo() is defined by RFC3484 which says reachable addresses are preferred over non-reachable addresses. If you have an IPv6-capable interface with non-temporary, non-deprecated address on your PC, IPV6 will take preference over IPv4. (with the default settings).
I have to talk from memory, because the issue apparently disapeared when I changed the priority in gai.conf.
Yes, that is how it is supposed to work.
Well, no, not the exact reverse, I got confused. The issue happened with sites that have both addresses, or those that only have IPv6. Those IPv6 addresses should simply be ignored if there is no IPv6 route to internet, IMO.
They will be ranked lower than the IPv4 addresses, but that is sufficient. Here, try this code if you want: http://files.jessen.ch/testgai.c compile with: gcc -o testgai testgai.c run with: ./testgai some.host.name It does an address lookup the way any typical Linux application would do it, and prints out the addresses in order of preference. On my systems without IPv6 (i.e. only fe80:: addresses), IPv4 addresses are listed first. -- Per Jessen, Zürich (25.2°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org