I'm feeling ambitious ;-)
Seriously, I think this would be very worthwhile - I hate having to remember
IP addresses.
It would all be done by now except that I have to handle the IPv6 stuff
(thanks god for edition 2 of Stevens).
andrew
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "Larry Rosenman" <ler@lerctr.org>
Cc: "Andrew Dunstan" <andrew@dunslane.net>; "PostgreSQL Hackers Mailing
List" <pgsql-hackers@postgresql.org>
Sent: Wednesday, May 07, 2003 12:29 PM
Subject: Re: [HACKERS] CIDR in pg_hba.conf
> Larry Rosenman <ler@lerctr.org> writes:
> > --On Wednesday, May 07, 2003 09:50:55 -0400 Andrew Dunstan
> >> So in hba.c, if we found a / in the IP address, we wouldn't go looking
> >> for a separate netmask field.
>
> > Please do this !
>
> It works for me. One thought though: someday someone might want to get
> around to allowing a DNS name in the host field, too. Can we define a
> test that handles all three cases? Perhaps do this:
>
> * If IP address contains only 0-9 and dot (easily coded with strspn()),
> then it's old-style IP address; expect netmask as next field.
>
> * If IP address contains only 0-9, dot, and slash, then it's CIDR;
> there's no separate netmask field.
>
> * Otherwise IP address is a DNS name; there's no separate netmask.
> (This case can error out for now, unless you're feeling ambitious.)
>
> regards, tom lane
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster