Re: IPv6 patch

From: Greg Copeland <greg(at)CopelandConsulting(dot)Net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Nigel Kukard <nkukard(at)lbsd(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IPv6 patch
Date: 2003-01-06 21:54:13
Message-ID: 1041890053.17321.68.camel@mouse.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2003-01-06 at 15:43, Bruce Momjian wrote:
> Greg Copeland wrote:
> > On Mon, 2003-01-06 at 15:29, Peter Eisentraut wrote:
> > > (2) A socket type is explicitly enabled for the server to use, and if
> > > creation fails, server startup fails. It seems that the current code
> > > falls back to IPv4 if IPv6 fails.
> >
> > IIRC, it allows it to fall back to IPv4 in case it's compiled for IPv6
> > support but the kernel isn't compiled to support IPv6. If that is the
> > case, admittedly, you seem to have a point. If someone compiles in v6
> > support and their system doesn't have v6 support and it's been requested
> > via run-time config, it's should fail just like any other.
>
> Yes, right now, it is kind of a mystery when it falls back to IPv4. It
> does print a message in the server logs:
>
> LOG: server socket failure: getaddrinfo2() using IPv6: hostname nor servname provided, or not known
> LOG: IPv6 support disabled --- perhaps the kernel does not support IPv6
> LOG: IPv4 socket created
>
> It appears right at the top because creating the socket is the first
> thing it does. A good question is once we have a way for the user to
> control IPv4/6, what do we ship as a default? IPv4-only? Both, and if
> both, do we fail on a kernel that doesn't have IPv6 enabled?

So you're saying that by using the IPv6 address family and you bind to
an IPv6 address (or even ANY interface), you still get v4 connections on
the same bind/listen/accept sequence?

I'm asking because I've never done v6 stuff.

Regards,

--
Greg Copeland <greg(at)copelandconsulting(dot)net>
Copeland Computer Consulting

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2003-01-06 21:57:07 Re: SQL_SIZING view
Previous Message Marc G. Fournier 2003-01-06 21:53:55 Re: New Portal in Place, DNS switched ...