Bug 624608 - jwhois does not handle multi-homed server
Summary: jwhois does not handle multi-homed server
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: jwhois
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-17 08:34 UTC by Petr Pisar
Modified: 2010-10-05 09:27 UTC (History)
3 users (show)

Fixed In Version: jwhois-4.0-21.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-05 09:27:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2010-08-17 08:34:30 UTC
$ rpm -qf $(type -p whois)
jwhois-4.0-20.fc13.x86_64

$ whois 203.240.203.30
[Querying whois.apnic.net]
[Unable to connect to remote host]

$ telnet  whois.apnic.net 43
Trying 2001:dc0:2001:11::227...
telnet: connect to address 2001:dc0:2001:11::227: Network is unreachable
Trying 202.12.29.220...
Connected to whois.apnic.net.
Escape character is '^]'.
% [whois.apnic.net node-2]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

^]
telnet> quit
Connection closed.

jwhois fails to connect to IPv6 address and for some reason does not try next address (the IPv4 one). Strace shows more:

$ strace whois 203.240.203.30
[...]
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(43), inet_pton(AF_INET6, "2001:dc0:2001:11::227", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
getsockname(3, {sa_family=AF_INET6, sin6_port=htons(52269), inet_pton(AF_INET6, "2620:52:0:2219:1aa9:5ff:feb6:209b", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
close(3)                                = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 3
fcntl(3, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(3, {sa_family=AF_INET6, sin6_port=htons(43), inet_pton(AF_INET6, "2001:dc0:2001:11::227", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EINPROGRESS (Operation now in progress)
select(1024, NULL, [3], NULL, {75, 0})  = 1 (out [3], left {74, 998997})
getsockopt(3, SOL_SOCKET, SO_ERROR, [101], [4]) = 0
close(3)                                = 0
write(1, "[Unable to connect to remote hos"..., 35[Unable to connect to remote host]
) = 35
exit_group(1)

My network configuration: I have both IPv6 and IPv4 addresses, my resolver prefers IPv6 (i.e. returns IPv6 address fist, then IPv4), my IPv6 border router blocks all out-going traffic and returns ICMPv6 Network unreachable message.

Correct behavior is to try to connect to each network address associated with the domain name as telnet does.

Comment 1 Fedora Update System 2010-09-29 15:29:18 UTC
jwhois-4.0-21.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/jwhois-4.0-21.fc13

Comment 2 Fedora Update System 2010-09-30 10:24:31 UTC
jwhois-4.0-21.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update jwhois'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/jwhois-4.0-21.fc13

Comment 3 Fedora Update System 2010-10-05 09:27:07 UTC
jwhois-4.0-21.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.