pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zoltan Boszormenyi <zb@cybertec.at>
To: pgsql-odbc@postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: psqlODBC and IPv6
Date: Tue, 16 Sep 2008 08:32:20 +0200
Message-ID: <48CF52F4.6040206@cybertec.at> (raw)

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/




view thread (5+ messages)  latest in thread

Message-ID: <48CF52F4.6040206@cybertec.at>
Permalink:  ../48CF52F4.6040206@cybertec.at/
Also on:    postgresql.org/message-id/48CF52F4.6040206@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: zb@cybertec.at, tgl@sss.pgh.pa.us
  Subject: Re: psqlODBC and IPv6
  In-Reply-To: <48CF52F4.6040206@cybertec.at>
  References: <48CF52F4.6040206@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox