Bug 155139 - [patch] net-p2p/transmission-daemon: don't use IPv6 localhost by default
Summary: [patch] net-p2p/transmission-daemon: don't use IPv6 localhost by default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jeremy Messenger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-01 01:50 UTC by swell.k
Modified: 2011-04-09 10:30 UTC (History)
0 users

See Also:


Attachments
a.diff (713 bytes, patch)
2011-03-01 01:50 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2011-03-01 01:50:11 UTC
FreeBSD by default tries to use IPv6 address for localhost
according to r64664 for /etc/hosts

  ::1			localhost localhost.my.domain
  127.0.0.1		localhost localhost.my.domain

as transmission-remote doesn't support IPv6 yet (see ticket#2236) the
connection may fail

  $ transmission-remote -l
  [04:25:19.761] transmission-remote: (http://localhost:9091/transmission/rpc/) Couldn't connect to server

or hang if net.inet.tcp.blackhole > 0

  $ truss transmission-remote -l
  [...]
  connect(3,{ AF_INET6 [f4ac:c301:800:0:10::]:16391 },28) ERR#36 'Operation now in progress'
Comment 1 Edwin Groothuis freebsd_committer 2011-03-01 01:50:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mezz

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 swell.k 2011-03-01 02:28:06 UTC
Anonymous <swell.k@gmail.com> writes:

> +-#define DEFAULT_HOST "localhost"
> ++#define DEFAULT_HOST "127.0.0.1"

FYI, similar issue was fixed in firefox-devel + PGO in freebsd-gecko repo

  ------------------------------------------------------------------------
  r484 | beat | 2011-01-15 21:55:57 +0000 (Sat, 15 Jan 2011) | 6 lines

  - Fix PGO build on systems where IPv6 is enabled. The SimpleHTTPServer
    binds to an IPv4 address only so force the browser to connect via
    127.0.0.1.

  Submitted by:   swills

but I'm not sure what causes this in transmission-remote case (libevent?).
Comment 3 Jeremy Messenger freebsd_committer 2011-03-05 04:18:24 UTC
State Changed
From-To: open->closed

Makes sense, I even have replied to transmission ticket #2236 to use your 
patch until then. Committed, thanks!
Comment 4 Pan Tsu 2011-04-09 10:20:17 UTC
It's likely related to libcurl as I can't reproduce it when ftp/curl is
compiled WITHOUT_CARES, cf.

  http://curl.haxx.se/mail/lib-2008-10/0123.html