severity 438179 wishlist
retitle 438149 Please provide a way to override RFC3484
thanks

Kurt Roeckx a écrit :
> On Thu, Aug 16, 2007 at 10:03:14PM +0200, Aurelien Jarno wrote:
>> Kurt Roeckx a écrit :
>>> reopen 438179
>>> thanks
>>>
>>> On Thu, Aug 16, 2007 at 08:24:51PM +0200, Aurelien Jarno wrote:
>>>> This is a feature, not a bug. getaddrinfo() sorts results according to
>>>> RFC3484. You can configure the way they are sorted using /etc/gai.conf.
>>> None of the rules in rfc3484 say anything about this.  In fact, the last
>>> rule says:
>>>    Rule 10:  Otherwise, leave the order unchanged.
>>>    If DA preceded DB in the original list, prefer DA.  Otherwise prefer
>>>    DB.
>> Rule 9 comes before:
>>
>>    Rule 9:  Use longest matching prefix.
>>    When DA and DB belong to the same address family (both are IPv6 or
>>    both are IPv4): If CommonPrefixLen(DA, Source(DA)) >
>>    CommonPrefixLen(DB, Source(DB)), then prefer DA.  Similarly, if
>>    CommonPrefixLen(DA, Source(DA)) < CommonPrefixLen(DB, Source(DB)),
>>    then prefer DB.
> 
> That's a rule that might work for IPv6, but not for IPv4.  But even when
> using IPv6, I think you want the CommonPrefixLen to be atleast 24 bit,
> maybe even 32, or even 64.
> 
> So, because I happen to have a 10.0.0.0/8 address, it prefers addresses
> which as many as possible 0's at the front.  This is unlikely to give me
> an address that's going to be close network-wise, since none of the
> returned addresses are actually in 10.0.0.0/8.

The fact you have a 10.0.0.0/8 does not changes anything to the way the
list is sorted in rule 9. Only the returned addresses are taken into
account.

>> Anyway if you don't want to sort to the returned addresses,
>> you only want to do that for IPv4, and thus need two different interfaces.
> 
> I think rule 9 shouldn't be use for IPv4 addresses, or be changed that
> the minimum CommonPrefixLen should be the that of the netmask of the
> source address.

This is explictely said in the RFC rule 9 also applies to IPv4 addresses.

Anyway the implementation of getaddrinfo() in the glibc is not buggy and
fully conforms to the RFC. The problem is that you don't agree with the
RFC. I therefore invite you to contact the author of this RFC, Rich
Draves <[EMAIL PROTECTED]>.

Meanwhile I don't consider this bug is of severity "important". It's
only a wishlist for a new option in /etc/gai.conf that will be added in
the next upload, but disabled by default.

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to