Date: Thu, 28 Jul 2016 22:14:12 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 211430] devel/apr1: IPv6 to IPv4 fallback does not work in serf Message-ID: <bug-211430-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211430 Bug ID: 211430 Summary: devel/apr1: IPv6 to IPv4 fallback does not work in serf Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: apache@FreeBSD.org Reporter: truckman@FreeBSD.org Flags: maintainer-feedback?(apache@FreeBSD.org) Assignee: apache@FreeBSD.org Created attachment 173081 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D173081&action= =3Dedit patch to modify apr1 poll() emulation to match behavior expected by serf. serf depends on the poll emulation in apr returning a POLLERR event if a non-blocking connect() attempt fails in order to trigger an IPv6 -> IPv4 fallback, or a fallback to another address for a multi-homed host. On Free= BSD, the poll emulation is done using kqueue, and the result returned by the pol= l() emulation is POLLIN + POLLHUP. connect(4,{ AF_INET6 [xxxx:xxxx:xxxx:xxxx::xxxx]:80 },28) ERR#36 'Operation= now in progress' gettimeofday({ 1469515046.979614 },0x0) =3D 0 (0x0) kevent(3,{ 4,EVFILT_READ,EV_ADD,0x0,0x0,0x805491300 },1,0x0,0,0x0) =3D 0 (0= x0) kevent(3,{ 4,EVFILT_WRITE,EV_ADD,0x0,0x0,0x805491300 },1,0x0,0,0x0) =3D 0 (= 0x0) kevent(3,0x0,0,{ 4,EVFILT_READ,EV_EOF,NOTE_LOWAT|0x3c,0x0,0x805491300 4,EVFILT_WRITE,EV_EOF,NOTE_LOWAT|0x3c,0x8000,0x805491300 },32,{ 0.500000000= }) =3D 2 (0x2) When serf sees this, it calls read(), which then fails with ECONNREFUSED (or whatever), which is not even a documented read() errno value. read(4,0x80549c064,8000) ERR#61 'Connection refused' What that occurs, serf closes the socket an any other addresses are not tri= ed. The attached patch modifies apr to return what serf expects in the case of a non-blocking connect() failure. Unfortunately, I did not see an easy way of handling ETIMEDOUT since that error can either be caused by connect failing= or after the connection is established. The poll emulation might need to differentiate between those two cases. This problem affects users of svn who don't have working IPv6 connectivity = to the FreeBSD svn servers. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211430-13>