psqlODBC and IPv6

From: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
To: pgsql-odbc(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: psqlODBC and IPv6
Date: 2008-09-16 06:32:20
Message-ID: 48CF52F4.6040206@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

does anyone know why 08.03.0200 fixed connecting to a server
via an IPv6 socket? 08.03.0100 is in Fedora 9 and connection is
very unreliable: https://bugzilla.redhat.com/show_bug.cgi?id=462312
The diff between .0100 and .0200 reveals only a thinko fix in socket.c:
=======================================
@@ -472,7 +485,7 @@ static int SOCK_wait_for_ready(SocketCla
tm.tv_sec = retry_count;
tm.tv_usec = 0;
}
- ret = select((int) socket + 1, output ? NULL : &fds,
output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm);
+ ret = select((int) sock->socket + 1, output ? NULL :
&fds, output ? &fds : NULL, &except_fds, no_timeout ? NULL : &tm);
gerrno = SOCK_ERRNO;
} while (ret < 0 && EINTR == gerrno);
if (retry_count < 0)
=======================================

There's no "socket" variable around there or even declared globally,
only the address of socket(2) function. But why would this
"select (address + 1, ...)" which is most likely larger than the number of
open files cause protocol errors in IPv6 but not in IPv4? There seems to be
no IPv6 specific in the changes between 08.03.0100 and .0200.

Thanks in advance,
Zoltán Böszörményi

--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Stephen Frost 2008-09-16 11:27:01 Re: psqlODBC and IPv6
Previous Message Devrim GÜNDÜZ 2008-09-10 20:49:30 Re: Psqlodbc install problem