dial(3) fails on OS X since commit 697c23cebcec

Issue #103 new
Anthony Sorace
created an issue
Since changeset 697c23cebcec (adding IPv6 support to dial), dial fails on (at least) OS X 10.8 (Mountain Lion). The error is (unhelpfully) "Invalid argument". The simplest test is probably:
iota; hget http://plan9.bell-labs.com
hget: too many errors with no progress Invalid argument
iota; dial tcp!plan9.bell-labs.com!http dial: dial: Invalid argument

Comments (4)

  1. David du Colombier

    Sorry, that's probably my fault. Sadly, I don't have any MacOS X machine to reproduce the problem.

    It's likely "Invalid argument" is returned by connect() in dial.c. This probably happens because your system expect the addrlen argument to be the length of the address family and not the length of the sockaddr structure.

    Could you try the attached patch? It might fix your problem. Thanks.

  2. Log in to comment