On April 28, 2014 5:43:34 PM CDT, Kenneth Westerback <kwesterb...@gmail.com> 
wrote:
>On 28 April 2014 18:05, Simon Perreault <si...@per.reau.lt> wrote:
>> Tech,
>>
>> Now that my AI_ADDRCONFIG diff is in, it's time to reveal my evil
>master plan:
>> make getaddrinfo() return IPv6 results first by default.
>
>Why is the burden on everyone to provide 'valid' objections? Should
>not the burden be on you to at least hint at a point to this change?
>Given the miniscule IPv6 usage out there, why should IPv6 come first?
>
>.... Ken
>
>>
>> The diff below would be the end goal. I guess people will have valid
>objections
>> to it. I'd like to know what they are.
>>
>> Would it be necessary/desirable to check all calls to getaddrinfo()
>in base and
>> add AI_ADDRCONFIG to hints.ai_flags where needed? (i.e. pretty much
>everywhere
>> except special cases which right now I can't think of any)
>>
>> Thanks,
>> Simon
>>
>>
>> Index: lib/libc/asr/asr.c
>> ===================================================================
>> RCS file: /cvs/src/lib/libc/asr/asr.c,v
>> retrieving revision 1.33
>> diff -u -p -r1.33 asr.c
>> --- lib/libc/asr/asr.c  26 Mar 2014 18:13:15 -0000      1.33
>> +++ lib/libc/asr/asr.c  28 Apr 2014 21:43:52 -0000
>> @@ -518,8 +518,8 @@ asr_ctx_create(void)
>>         ac->ac_options = RES_RECURSE | RES_DEFNAMES | RES_DNSRCH;
>>         ac->ac_refcount = 1;
>>         ac->ac_ndots = 1;
>> -       ac->ac_family[0] = AF_INET;
>> -       ac->ac_family[1] = AF_INET6;
>> +       ac->ac_family[0] = AF_INET6;
>> +       ac->ac_family[1] = AF_INET;
>>         ac->ac_family[2] = -1;
>>
>>         ac->ac_hostfile = DEFAULT_HOSTFILE;
>> Index: share/man/man5/resolv.conf.5
>> ===================================================================
>> RCS file: /cvs/src/share/man/man5/resolv.conf.5,v
>> retrieving revision 1.44
>> diff -u -p -r1.44 resolv.conf.5
>> --- share/man/man5/resolv.conf.5        14 Jul 2013 19:44:39 -0000   
>  1.44
>> +++ share/man/man5/resolv.conf.5        28 Apr 2014 21:43:52 -0000
>> @@ -217,8 +217,8 @@ For example:
>>  .It Cm family
>>  Specify which type of Internet protocol family to prefer,
>>  if a host is reachable using different address families.
>> -By default IPv4 addresses are queried first,
>> -and then IPv6 addresses.
>> +By default IPv6 addresses are queried first,
>> +and then IPv4 addresses.
>>  The syntax is:
>>  .Bd -ragged -offset indent
>>  .Cm family Ar family Op Ar family
>>

While I'm aware this post is futile, you just answered your own question.
The point of making such a change is to help change that situation.
This is somewhat like saying the burden should be on all browser users to 
manually enable support for TLSv1.2, because hardly any web servers use it.
Someone has to take the first/next step, and that's a very traditional role for 
OpenBSD.
Having said all that, I'm on the fence about this - nice idea in theory,  but 
the timeout issue is difficult to live with, and adds an unnecessary barrier to 
new OpenBSD users.
And before you ask, I *have* put my money where my mouth is - I'm 100% native 
IPv6 all the way to the 'net (at 5x the cost of just getting a much faster IPv4 
service).  At present, over 10% of my traffic is v6, but only *after* I 
manually edited resolve.conf to default to v6.
-Adam
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to