Bug 196115 - net/tsocks: handle EISCONN when connecting to a server
Summary: net/tsocks: handle EISCONN when connecting to a server
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-19 00:29 UTC by Anthony Cornehl
Modified: 2014-12-19 02:17 UTC (History)
1 user (show)

See Also:


Attachments
patch for tsocks.c (670 bytes, patch)
2014-12-19 00:29 UTC, Anthony Cornehl
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Cornehl 2014-12-19 00:29:35 UTC
Created attachment 150740 [details]
patch for tsocks.c

Upstream bug: http://sourceforge.net/p/tsocks/bugs/20/
Version: FreeBSD 11.0-CURRENT #0 07482a2(onefs-compat): Wed Nov 19 19:50:05 PST 2014

~ % tsocks curl -LI google.com
14:30:52 libtsocks(33389): Error 56 attempting to connect to SOCKS server (Socket is already connected)
curl: (52) Empty reply from server

The attached patch allows the connection to go down the right path when EISCONN is returned, which is what happens when the connection is already established. The tsocks handling works as I'd expect with this change.

~ % tsocks curl -LI google.com
HTTP/1.1 301 Moved Permanently
[...]
HTTP/1.1 200 OK
[...]
Comment 1 Bryan Drewery freebsd_committer freebsd_triage 2014-12-19 02:17:40 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-12-19 02:17:50 UTC
A commit references this bug:

Author: bdrewery
Date: Fri Dec 19 02:17:31 UTC 2014
New revision: 374938
URL: https://svnweb.freebsd.org/changeset/ports/374938

Log:
  - Handle EISCONN

  PR:		ports/196115
  Submitted by:	Anthony Cornehl <accornehl@fastmail.fm>

Changes:
  head/net/tsocks/Makefile
  head/net/tsocks/files/patch-tsocks.c