Re: CIDR in pg_hba.conf

From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CIDR in pg_hba.conf
Date: 2003-05-07 17:57:21
Message-ID: 016901c314c2$1c0f94e0$6401a8c0@DUNSLANE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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(at)sss(dot)pgh(dot)pa(dot)us>
To: "Larry Rosenman" <ler(at)lerctr(dot)org>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>; "PostgreSQL Hackers Mailing
List" <pgsql-hackers(at)postgresql(dot)org>
Sent: Wednesday, May 07, 2003 12:29 PM
Subject: Re: [HACKERS] CIDR in pg_hba.conf

> Larry Rosenman <ler(at)lerctr(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2003-05-07 18:05:30 Re: CIDR in pg_hba.conf
Previous Message scott.marlowe 2003-05-07 17:44:12 Re: CIDR in pg_hba.conf