Re: Cleaning up the INET/CIDR mess

From: Steve Atkins <steve(at)wordtothewise(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cleaning up the INET/CIDR mess
Date: 2006-01-25 17:49:53
Message-ID: C24D17EF-DE27-4275-BE01-01D8C9028569@wordtothewise.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Jan 25, 2006, at 9:29 AM, Bruce Momjian wrote:

> Tom Lane wrote:
>> Greg Stark <gsstark(at)mit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-01-25 18:07:36 Re: [PATCHES] Adding a --quiet option to initdb
Previous Message Andrew - Supernews 2006-01-25 17:41:00 Re: Cleaning up the INET/CIDR mess