Ticket #30 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

connectTo does not try all addresses

Reported by: feuerbach Owned by:
Priority: major Milestone:
Component: network Version:
Keywords: Cc: roma@…, aditya.siram@…

Description

There is recently reported bug in connectTo (http://www.mail-archive.com/haskell-cafe@haskell.org/msg76549.html) which is caused by not trying to connect to all the addresses returned by getAddrInfo. This may be an a problem when the first address returned is IPv6 but service is accessible only by IPv4 (or vice versa).

Also see discussion of the issue by Ulrich Drepper here: http://people.redhat.com/drepper/userapi-ipv6.html

I'm attaching a patch with a fix.

On a related note, although not directly related to IPv6, it might be also useful to try to connect to all the addresses in gethostbyname-version of connectTo. (And also for the sake of consistency between different implementations of connectTo.)

Change History

Changed 4 years ago by feuerbach

I'm getting "permission denied" error when trying to upload the patch, so please get it here: http://ro-che.info/docs/connect.dpatch

Changed 4 years ago by tibbe

  • status changed from new to closed
  • resolution set to fixed

Applied. Thanks for the patch.

Note: See TracTickets for help on using tickets.