Re: Bogus bind() warnings

Поиск
Список
Период
Сортировка
От Kurt Roeckx
Тема Re: Bogus bind() warnings
Дата
Msg-id 20031106221757.GA3053@ping.be
обсуждение исходный текст
Ответ на Re: Bogus bind() warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bogus bind() warnings
Список pgsql-hackers
On Thu, Nov 06, 2003 at 03:42:39PM -0500, Tom Lane wrote:
> >> Is it possible that that kernel considers binding to an IPv6 port to
> >> conflict with binding to the "same" port number as an IPv4 port?
> 
> Actually, I think that that may be expected behavior depending on the
> vintage of the kernel.  Note the following comment in
> StreamServerPort():
> 
>         /*
>          * Note: This might fail on some OS's, like Linux older than
>          * 2.4.21-pre3, that don't have the IPV6_V6ONLY socket option, and
>          * map ipv4 addresses to ipv6.    It will show ::ffff:ipv4 for all
>          * ipv4 connections.
>          */

Maybe my comment isn't clear enough ...

It fails on Linux in case you first bind the AF_INET6 socket to
::, and then try to bind to AF_INET 0.0.0.0, and don't have the
IPV6_V6ONLY options.

You have this problem from the moment you enable ipv6 support in
your kernel.

The real fix is to get a kernel/libc that has the IPV6_V6ONLY
socket option.

Being unable to bind to the port isn't a problem in case you
already got the AF_INET6 one.  But maybe it might confuse some
users who then think something is wrong.

Should we just not give that error message, in case we already
binded to AF_INET6 ::?


Kurt



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [pgsql-advocacy] Changes to Contributor List
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [pgsql-www] Changes to Contributor List