Re: Cleaning up the INET/CIDR mess - Mailing list pgsql-hackers

From Steve Atkins
Subject Re: Cleaning up the INET/CIDR mess
Date
Msg-id C24D17EF-DE27-4275-BE01-01D8C9028569@wordtothewise.com
Whole thread Raw
In response to Re: Cleaning up the INET/CIDR mess  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Jan 25, 2006, at 9:29 AM, Bruce Momjian wrote:

> Tom Lane wrote:
>> Greg Stark <gsstark@mit.edu> writes:
>>> I wonder if this would be an opportunity to fix Postgres's  
>>> handling of
>>> addresses like '10.1'.
>>
>> You've mistaken this for a proposal to change the I/O behavior, which
>> it is specifically not.
>>
>>> The standard interpretation of this is the same as '10.0.0.1'.
>>
>> Standard according to whom?  Paul Vixie evidently doesn't think that
>> that's a standard abbreviation, else the code we borrowed from  
>> libbind
>> would do it already.
>
> Agreed.  10.1 as 10.0.0.1 is an old behavior which has been removed  
> from
> most modern versions of networking tools.

Whether PG should support it or not is another question (personally I  
think
that anything other than a dotted quad should fail with an error) but  
it certainly
hasn't been removed from most modern versions of networking tools.

gethostbyname() is used by most networking tools, and on most unix OSes
it believes "10.1" 'resolves to' "10.0.0.1". That includes current  
versions of
linux, OS X, Solaris, Windows XP and I believe the BSDs.

So the vast majority of applications on the vast majority of deployed  
platforms
believe that "10.1" is the address 10.0.0.1. (As is often the case binds
behaviour is inconsistent and can't really be used as "proof" of  
standard
behaviour).

Cheers,  Steve


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Cleaning up the INET/CIDR mess
Next
From: Bricklen Anderson
Date:
Subject: Re: Rollback Mountain