Re: TCP/IP with 7.4 beta2 broken? - Mailing list pgsql-hackers

From Kurt Roeckx
Subject Re: TCP/IP with 7.4 beta2 broken?
Date
Msg-id 20030903171408.GA7907@ping.be
Whole thread Raw
In response to TCP/IP with 7.4 beta2 broken?  (Tommi Mäkitalo <t.maekitalo@epgmbh.de>)
List pgsql-hackers
On Mon, Sep 01, 2003 at 09:59:17PM +0200, Tommi Mäkitalo wrote:
> 
> psql: FATAL:  no pg_hba.conf entry for host "::ffff:127.0.0.1", user 
> "postgres", database "template1"

This is a Linux system that does not have the IPV6_V6ONLY
setsockopt() option.  Linux only has this option since 2.4.21
(pre3).

This means that an IPv6 socket bound to "::" (all addresses) will
listen for both all IPv4 and IPv6 addresses.
If that option exists, it will only listen to all IPv6 addresses.
If the option doesn't exist, it can't bind to the 0.0.0.0 ipv4
socket, because the IPv6 socket already is bound to it.

So all connections you get are, from the application's point of
view, IPv6 connections.

IPv4 connections on an AF_INET6 socket are called IPv4-mapped
IPv6.  It was something they created to make it easier to port
applications to IPv6, but it only makes things worse.


Kurt



pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: TCP/IP with 7.4 beta2 broken?
Next
From: Peter Eisentraut
Date:
Subject: Re: testing for usable C compiler