Thread: non-ipv6 vs hostnames

non-ipv6 vs hostnames

From
Magnus Hagander
Date:
Accidentally specifying an IPv6 address in pg_hba.conf on a system
that doesn't have ipv6 support gives the following error:

LOG:  specifying both host name and CIDR mask is invalid: "::1/128"


Which is obviously wrong, because I didn't do that. Do we need to
detect and special-case ipv6 addresses in this case?

FWIW, the line was simply:
host    replication     all ::1/128                 trust

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: non-ipv6 vs hostnames

From
Tom Lane
Date:
Magnus Hagander <magnus@hagander.net> writes:
> Accidentally specifying an IPv6 address in pg_hba.conf on a system
> that doesn't have ipv6 support gives the following error:

> LOG:  specifying both host name and CIDR mask is invalid: "::1/128"

> Which is obviously wrong, because I didn't do that. Do we need to
> detect and special-case ipv6 addresses in this case?

Doesn't really seem worth going out of our way for that.  Systems with
no IPv6 support are a dying breed, and will be more so by the time 9.2
gets deployed.
        regards, tom lane


Re: non-ipv6 vs hostnames

From
Magnus Hagander
Date:
On Tue, Aug 16, 2011 at 16:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> Accidentally specifying an IPv6 address in pg_hba.conf on a system
>> that doesn't have ipv6 support gives the following error:
>
>> LOG:  specifying both host name and CIDR mask is invalid: "::1/128"
>
>> Which is obviously wrong, because I didn't do that. Do we need to
>> detect and special-case ipv6 addresses in this case?
>
> Doesn't really seem worth going out of our way for that.  Systems with
> no IPv6 support are a dying breed, and will be more so by the time 9.2
> gets deployed.

Well, I got this on a win64 build. It's *supposed* to have ipv6. I
wonder if it breaks on windows just because there is no ipv6 address
on the machine...

Unfortunately I shut the machine down and won't have time to test more
right now, but I'll try to figure that out later unless beaten to
it...


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Re: non-ipv6 vs hostnames

From
Peter Eisentraut
Date:
On tis, 2011-08-16 at 16:17 +0200, Magnus Hagander wrote:
> Well, I got this on a win64 build. It's *supposed* to have ipv6. I
> wonder if it breaks on windows just because there is no ipv6 address
> on the machine... 

It would mean that getaddrinfo() of "::1" failed.  That seems weird.



Re: non-ipv6 vs hostnames

From
Date:
> On tis, 2011-08-16 at 16:17 +0200, Magnus Hagander wrote:
> > Well, I got this on a win64 build. It's *supposed* to have ipv6. I
> > wonder if it breaks on windows just because there is no ipv6 address
> > on the machine...
> 
> It would mean that getaddrinfo() of "::1" failed.  That seems weird.
> 

A system admin can set registry keys to disable IPv6, either partially (allowing ::1), or totally (all IPv6 addresses
fail).

If the system has IPv6 enabled, it's not possible for there to be no ipv6 address.  There is always the link-local
addressof each LAN adapter.
 


Re: non-ipv6 vs hostnames

From
Peter Eisentraut
Date:
On ons, 2011-08-17 at 13:12 -0400, Charles.McDevitt@emc.com wrote:
> > On tis, 2011-08-16 at 16:17 +0200, Magnus Hagander wrote:
> > > Well, I got this on a win64 build. It's *supposed* to have ipv6. I
> > > wonder if it breaks on windows just because there is no ipv6 address
> > > on the machine...
> > 
> > It would mean that getaddrinfo() of "::1" failed.  That seems weird.
> > 
> 
> A system admin can set registry keys to disable IPv6, either partially (allowing ::1), or totally (all IPv6 addresses
fail).
> 
> If the system has IPv6 enabled, it's not possible for there to be no ipv6 address.  There is always the link-local
addressof each LAN adapter.
 

The problem here is that the system cannot *parse* the address "::1".
This should not have anything to do with which addresses exist or could
exist.