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 22:29:00
Message-ID: 1041892139.17326.80.camel@mouse.copelandconsulting.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2003-01-06 at 16:17, Bruce Momjian wrote:
> Greg Copeland wrote:
> > On Mon, 2003-01-06 at 15:59, Bruce Momjian wrote:
> > > Greg Copeland wrote:
> > > > > 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.
> > >
> > > Yes, it listens on both. The original author, Nigel, tested in using
> > > both IPv4 and IPv6, and the #ipv6 IRC channel and google postings seem
> > > to indicate that too. What I am not sure how to do is say _only_ IPv4.
> >
> > Wouldn't you just use an IPv4 address family when creating your socket?
>
> Sorry, I meant only IPv6.

I found this. It seems to imply that you need different sockets to do
what you want to do. You might snag a copy of the latest openldap code
and look at slapd to see what it's doing.

At any rate, here's what I found that pointed me at it:

slapd compiled with --enable-ipv6 does only listen to the IPv6 connections. I
suspect this is tested on an operating system that receives IPv4 connections to
the IPv6 socket as well, although this is not not the case for OpenBSD (nor
FreeBSD or NetBSD ,IIRC). slapd needs to listen to both IPv4 and IPv6 on
separate sockets.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-06 22:33:09 Re: IPv6 patch
Previous Message Bruce Momjian 2003-01-06 22:17:46 Re: IPv6 patch