Debian Bug report logs - #542148
jwhois: connection failures

version graph

Package: jwhois; Maintainer for jwhois is Paul Dwerryhouse <paul@dwerryhouse.com.au>; Source for jwhois is src:jwhois.

Reported by: Alan Curry <pacman@kosh.dhis.org>

Date: Tue, 18 Aug 2009 04:45:04 UTC

Severity: normal

Tags: patch

Found in version jwhois/4.0-1

Fixed in version jwhois/4.0-2

Done: Paul Dwerryhouse <paul@dwerryhouse.com.au>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Paul Dwerryhouse <paul@dwerryhouse.com.au>:
Bug#542148; Package jwhois. (Tue, 18 Aug 2009 04:45:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alan Curry <pacman@kosh.dhis.org>:
New Bug report received and forwarded. Copy sent to Paul Dwerryhouse <paul@dwerryhouse.com.au>. (Tue, 18 Aug 2009 04:45:07 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Alan Curry <pacman@kosh.dhis.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: jwhois: connection failures
Date: Mon, 17 Aug 2009 23:44:13 -0500
Package: jwhois
Version: 4.0-1
Severity: normal
Tags: patch

With the current version of jwhois, I can't do IP address lookups. It fails
to connect to whois.arin.net, whois.ripe.net, and whois.apnic.net. These
lookups used to work with some older version (I'm not sure which).

The problem is in make_connect() in utils.c, the part that loops over the
list of results obtained from lookup_host_addrinfo(). After attempting to
make a connection, it does this:

      error = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &retval, &retlen);
      if (error < 0 || retval)
        {
          break;
        }

The intent was apparently to break out of the loop when a successful
connection occurs, but the retval test does the opposite, breaking out when a
connection fails.

With whois.arin.net for example, there are 2 IPv4 addresses and an IPv6
address. This loop connects to the first address successfully, so the
getsockopt results in error=0 retval=0, so it doesn't break. The next time
through the loop, it connects to the second address successfully, and doesn't
break. The third time, it fails to connect to the third address, because I
don't have IPv6. Now the loop ends and the function returns -1, failed to
connect, and the results look like this:

$ whois 199.232.41.10
[Querying whois.arin.net]
[Error creating socket]
[Unable to connect to remote host]

(Horrible error reporting, no strerror(errno) in it anywhere)

This patch gets it working again.

--- src/utils.c	2007-06-26 02:00:20.000000000 -0500
+++ src/utils.c	2009-08-17 23:35:09.000000000 -0500
@@ -288,7 +288,7 @@
 
       retlen = sizeof(retval);
       error = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &retval, &retlen);
-      if (error < 0 || retval)
+      if (error < 0 || !retval)
 	{
 	  break;
 	}

-- Syster Information:
Debian Release: 5.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.30.2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages jwhois depends on:
ii  adduser                       3.110      add and remove users and groups
ii  dpkg                          1.14.25    Debian package management system
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libgdbm3                      1.8.3-3    GNU dbm database routines (runtime

Versions of packages jwhois recommends:
pn  lynx                          <none>     (no description available)

jwhois suggests no packages.

-- no debconf information




Reply sent to Paul Dwerryhouse <paul@dwerryhouse.com.au>:
You have taken responsibility. (Tue, 23 Nov 2010 22:51:12 GMT) Full text and rfc822 format available.

Notification sent to Alan Curry <pacman@kosh.dhis.org>:
Bug acknowledged by developer. (Tue, 23 Nov 2010 22:51:12 GMT) Full text and rfc822 format available.

Message #10 received at 542148-close@bugs.debian.org (full text, mbox):

From: Paul Dwerryhouse <paul@dwerryhouse.com.au>
To: 542148-close@bugs.debian.org
Subject: Bug#542148: fixed in jwhois 4.0-2
Date: Tue, 23 Nov 2010 22:48:10 +0000
Source: jwhois
Source-Version: 4.0-2

We believe that the bug you reported is fixed in the latest version of
jwhois, which is due to be installed in the Debian FTP archive:

jwhois_4.0-2.diff.gz
  to main/j/jwhois/jwhois_4.0-2.diff.gz
jwhois_4.0-2.dsc
  to main/j/jwhois/jwhois_4.0-2.dsc
jwhois_4.0-2_powerpc.deb
  to main/j/jwhois/jwhois_4.0-2_powerpc.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 542148@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paul Dwerryhouse <paul@dwerryhouse.com.au> (supplier of updated jwhois package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 16 Mar 2010 11:41:02 -0700
Source: jwhois
Binary: jwhois
Architecture: source powerpc
Version: 4.0-2
Distribution: unstable
Urgency: low
Maintainer: Paul Dwerryhouse <paul@dwerryhouse.com.au>
Changed-By: Paul Dwerryhouse <paul@dwerryhouse.com.au>
Description: 
 jwhois     - Improved Caching Whois client
Closes: 236317 321848 410327 542148
Changes: 
 jwhois (4.0-2) unstable; urgency=low
 .
   * Updated to latest Debian standards
   * version 4.0 fixes timeout issue (Closes: #410327)
   * version 4.0 supports IDN (Closes: #236317)
   * package builds fine from source (Closes: #321848)
   * Alan Curry's retval patch (Closes: #542148)
   * added set -e to postinst and postrm
Checksums-Sha1: 
 65e1c115bf92df114929f30207189ed89bbcbc1b 1669 jwhois_4.0-2.dsc
 27eadc0eedebaa1c903782e00c3af2ecb7d9fb64 8032 jwhois_4.0-2.diff.gz
 55eda73bc0ff4242f2dc8c8ac1b1ed5c535932d3 96194 jwhois_4.0-2_powerpc.deb
Checksums-Sha256: 
 550db4a3d0c0faf9229e8b75d96e388ca497de46e76c85b13a8fe3ddf3d6d15a 1669 jwhois_4.0-2.dsc
 f67e9ed238bf34ad039444f4e29741638f3082b5218c73deaf4919a2b3e08a37 8032 jwhois_4.0-2.diff.gz
 867a5dcd28e3b0ff02d57b211e01320570bdf3c04770b3afb2ca36ddefc1f0d9 96194 jwhois_4.0-2_powerpc.deb
Files: 
 1848c4f05dc293c0e725b1916f9f87ac 1669 net optional jwhois_4.0-2.dsc
 4706498df3c2e90ccebe17870a7eeab2 8032 net optional jwhois_4.0-2.diff.gz
 4a7f1cadd0110a67ff32498bf8548d36 96194 net optional jwhois_4.0-2_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCAAGBQJM7EEjAAoJEHxWrP6UeJfY86gQALmMV6HSE76U+uWOnZCyOZSE
jJC/m4iTFOyGS+cOd1OuUawuDSqSxybqM6J1XZqXuy+wV7DtiYTkZUMjRAYas2yf
YOkD5cJLPEr/ZGzA2XwiEzc7Iwxjfmt0At991tW1m5oo2Op3KoByqPbuBL6jaRwa
auIjfLNO9Hg2zrVKDu667CWuLQ11R9q9zJKv/e2LpSZw+17AdXRzTGqfmZ35ptG9
fG2MaDI6FhX8CKZ+nzLYFdY8iupPh3eDs8zeTuXI1AzflX/jNNmEOH/48OjTUAk3
DA2nFL9IRzPG1Pa7gr53xfGwfkpTOywXTL3G1+3VitRSaY3HWIqO7QuCLoEZx/YC
aE35kzu90a73olwtyD8y2+6pzVM3BflWoQEY3eKO4VXYz/t2WQMCFBlvOhc/ASm7
8MM7Jvw/T/prUKt0QsOwdPMePwSQplYWPpXidZZn8EIb2nPgj/z9OWbG0VMrCWhO
zvdWQWBtC1XKVNjHZXMtor20bfBm5I7vABTlGCzQotZXD5zZuh12LYJjfXU7d8VY
DPVD0EKTNZMxB1Nw7axS6A2nnEGP05g29sdaiddbfzvWwlxV0EZXri2AOPqrv4ad
ZzH5FAnd90cYXlnPcVHeum4EtTnuciS4H4CY1Vha3D2PlZ1IfhmqXOjl+FlhZnUG
RgfA+AyAB3VmRpnmR3mI
=v0LP
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 07 Mar 2011 09:03:39 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 16:28:02 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.