Re: Cleaning up the INET/CIDR mess

From: Greg Stark <gsstark(at)mit(dot)edu>
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cleaning up the INET/CIDR mess
Date: 2006-01-25 18:17:22
Message-ID: 87slrctbnx.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Andrew - Supernews <andrew+nonews(at)supernews(dot)com> writes:

> On 2006-01-25, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> > Agreed. 10.1 as 10.0.0.1 is an old behavior which has been removed from
> > most modern versions of networking tools.

On the contrary not only is it still widely used but it is *required* by POSIX
for the relevant functions, inet_aton and getaddrinfo. Note that getaddrinfo
was created from whole cloth by POSIX so there was no backwards compatibility
need for it.

This isn't an obscure old-fashioned thing. People really do use this syntax.

> Indeed so. However the current behaviour has neither the merit of being
> traditional nor the merit of being logical:

Well for networks (cidr datatype) people do frequently refer to things like
10.1/16 and intend it to mean the network prefix. Sure you could argue having
the netmask default to the old class-based addressing is anachronistic but
what other default netmask would you suggest anyways? The only other
reasonable default would be the longest 0-bit suffix which would produce some
odd surprising results like '10.1/16' but '10.2/17'.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Hallgren 2006-01-25 18:23:19 Re: Adding a --quiet option to initdb
Previous Message Bruce Momjian 2006-01-25 18:08:01 Re: Cleaning up the INET/CIDR mess