Fails to fallback to ipv4 address when ipv6 is unreachable
I have an XMPP server that has SRV records set up. Gajim appears to be finding the SRV record correctly, but seems like it might only try to resolve the AAAA address for the specified host even when the connection is unreachable.
Example: warner.fm
$ dig srv _xmpp-client._tcp.warner.fm
_xmpp-client._tcp.warner.fm. 58750 IN SRV 10 0 5222 argo.pyxos.net.
This host has both an IPv4 and IPv6 IP, but my local box only has IPv4:
$ dig a argo.pyxos.net aaaa argo.pyxos.net
argo.pyxos.net. 3541 IN AAAA 2002:423b:6d88::1
argo.pyxos.net. 53576 IN A 66.59.109.136
$ ping -c1 argo.pyxos.net
PING argo.pyxos.net (66.59.109.136) 56(84) bytes of data.
64 bytes from argo.pyxos.net (66.59.109.136): icmp_seq=1 ttl=46 time=36.0 ms
--- argo.pyxos.net ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 37ms
rtt min/avg/max/mdev = 36.099/36.099/36.099/0.000 ms
$ ping6 -c1 argo.pyxos.net
PING argo.pyxos.net(argo.pyxos.net) 56 data bytes
From 2001:4978:1d0:30::1 icmp_seq=1 Destination unreachable: No route
--- argo.pyxos.net ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 134ms
When I run gajim from the cli w/ --verbose
, I see:
2009-07-07 18:14:21,851 gajim.c.x.transports_nb: ERROR: Connection to 2002:423b:6d88::1 lost: 101:Network is unreachable [101]
DEBUG: client stop Disconnect detected
DEBUG: socket stop Plugging \<common.xmpp.transports_nb.NonBlockingTcp instance at 0x22fecb0> out of \<common.xmpp.client_nb.NonBlockingClient instance at 0x22fec20>.
DEBUG: client stop Disconnect detected
DEBUG: socket error 101:Network is unreachable
Traceback (most recent call last):
File "/usr/share/gajim/src/common/xmpp/transports_nb.py", line 443, in _do_receive
received = self._recv(RECV_BUFSIZE)
error: [Errno 101] Network is unreachable