Re: IPV4 addresses on IPV6 machines in pg_hba.conf

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, pgsql-patches(at)postgresql(dot)org
Subject: Re: IPV4 addresses on IPV6 machines in pg_hba.conf
Date: 2003-09-06 01:01:05
Message-ID: 200309060101.h86115j10967@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane wrote:
> Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> > are you sure it's not just for beauty's sake?
>
> What I didn't like about your last patch was the close coupling of the
> CIDR/netmask processing to the v4-to-v6 conversion; as Andrew pointed
> out, you were hacking into hba.c functionality that overlapped with
> SockAddr_cidr_mask. Doing the conversion after we've collected the
> netmask seems a lot cleaner to me. Also, this way keeps a fairly decent
> separation of interests between hba.c (parsing the hba.conf syntax) and
> ip.c (messing with address representations).
>
> > While talking about beauty: that setting of *cidr_slash to '/' and 0
> > doesn't look too esthetic...
>
> It is ugly (and I didn't write it ;-)). But if we palloc'd a modified
> version of the token we'd have to remember to pfree it, so it nets out
> to about the same amount of code either way I think. If you wanna try
> to clean it up more, be my guest ...

Would you like me to conditionally add the IPv6 line to pg_hba.conf from
initdb now?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message andrew 2003-09-06 01:14:04 Re: IPV4 addresses on IPV6 machines in pg_hba.conf
Previous Message andrew 2003-09-06 00:46:22 Re: IPV4 addresses on IPV6 machines in pg_hba.conf