Re: BUG #6110: pg_hba.conf samehost does not work - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #6110: pg_hba.conf samehost does not work
Date
Msg-id CA+TgmobFiXFORiO7dA+1QisSKuvwv4xzBb=U5kC24y9jSetfpg@mail.gmail.com
Whole thread Raw
In response to BUG #6110: pg_hba.conf samehost does not work  ("Binod Nepal" <nepalbinod@yahoo.com>)
List pgsql-bugs
On Mon, Jul 11, 2011 at 5:13 AM, Binod Nepal <nepalbinod@yahoo.com> wrote:
> # IPv4 local connections:
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 127.0=
.0.1/32 =A0 =A0 =A0 =A0 =A0 =A0md5
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 sameh=
ost =A0 =A0 =A0 =A0 =A0 =A0md5
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 samen=
et =A0 =A0 =A0 =A0 =A0 =A0md5
> # IPv6 local connections:
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 ::1/1=
28 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 md5
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 sameh=
ost =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0md5
> host =A0 =A0all =A0 =A0 =A0 =A0 =A0 =A0 all =A0 =A0 =A0 =A0 =A0 =A0 samen=
et =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0md5

I don't think it accomplishes anything at all to have the same lines
in there twice.  The comment doesn't affect whether the line applies
to IPv4 or IPv6.

ISTM the problem here must be the Windows version of
pg_foreach_ifaddr(), which uses this method to try to get a list of
addresses:

WSAIoctl(sock, SIO_GET_INTERFACE_LIST, 0, 0,
                                         ii, n_ii * sizeof(INTERFACE_INFO),
                                         &length, 0, 0)

Perhaps there's a better method we could be using, but I have no idea
what it is.  A quick Google search didn't turn up any IPv6-related
restrictions on SIO_GET_INTERFACE_LIST.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #6112: heuristic for empty parent tables that are members of inheritance trees
Next
From: Robert Haas
Date:
Subject: Re: Ambiguos OPERATOR items in pg_restore manifest file (was: [postgis-devel] utils/new_postgis_restore.pl)