| From: | <andrew(at)dunslane(dot)net> |
|---|---|
| To: | <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Re: IPV4 addresses on IPV6 machines in pg_hba.conf |
| Date: | 2003-09-06 00:46:22 |
| Message-ID: | 2520.24.211.141.25.1062809182.squirrel@www.dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
Tom Lane said:
> 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 ...
>
I wrote it :-) The reason is that alone of the tokens in this file
address/mask is a composite. I agree it is a bit ugly. In fact, this
whole function is ugly and getting uglier and needs recasting. I intend
to have a go at that, since I am partly responsible, but not in the
present cycle.
Nobody objected when the original patch from Kurt (including my bit) was
submitted, though, so it's a bit late to complain now about aesthetics.
cheers
andrew
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2003-09-06 01:01:05 | Re: IPV4 addresses on IPV6 machines in pg_hba.conf |
| Previous Message | Tom Lane | 2003-09-05 23:35:47 | Re: minor documentation improvements |