paramiko does not try all available address families

Bug #579530 reported by Andrew Bennetts on 2010-05-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

See failure at <>

The situation is a server that is listening on an IPv4 address only, but that host/interface has both IPv4 and IPv6 connectivity, and getaddinfo returns the IPv6 result before the IPv4. bzr asks paramiko to connect to the right (host,port) pair by calling paramiko.Transport.

What should happen is that paramiko should successfully connect to the server.

What does happen is that paramiko attempts to connect via IPv6, that fails with connection refused, and paramiko stops there with a connection refused error.

We can workaround this in bzr by connecting the socket ourselves and passing that object instead of an address to paramiko.

Related branches

Andrew Bennetts (spiv) wrote :

Btw, see the socket.create_connection function from the Python 2.6 standard library for the right way to handle this situation.

Vincent Ladeuil (vila) wrote :

.. and it's back on maverick.

@spiv, could you build your patched package for maverick too in ?

Vincent Ladeuil (vila) wrote :

... and now on natty as reported by jelmer on IRC

I took the liberty of forwarding this bug and the proposed merge



Jelmer Vernooij (jelmer) wrote :

Cherrypicked into debian and ubuntu.

Changed in bzr:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers