From: Fabienne Ducroquet <fabiduc@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Reinhard Max <max@suse.de>, Marcus Meissner <meissner@suse.de>,
sundell.software@gmail.com,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org
Subject: Re: net/ipv4: commit d0733d2e29b breaks rtorrent
Date: Thu, 23 Jun 2011 01:02:39 +0200 [thread overview]
Message-ID: <20110622230239.GA5009@localhost> (raw)
In-Reply-To: <20110622085329.65c625de@nehalam.ftrdhcpuser.net>
On Wed, Jun 22, 2011 at 08:53:29AM -0700, Stephen Hemminger wrote:
> You can find code here http://libtorrent.rakshasa.no/
> but it is in C++ so there is an abnormally high indirection factor
> between reality of the bug and the code as written.
I had a look at the code, I found where bind is called, but it does not
help: it is in libtorrent/src/net/socket_fd.cc:
bool
SocketFd::bind(const rak::socket_address& sa) {
check_valid();
return !::bind(m_fd, sa.c_sockaddr(), sa.length());
}
check_valid() checks the validity of the socket FD.
It is called by the function:
bool
Listen::open(uint16_t first, uint16_t last, const rak::socket_address* bindAddress) {
close();
[ Checks that the range of the ports is OK, that the address
is an inet or inet6 address, that the socket can be
allocated.]
rak::socket_address sa;
sa.copy(*bindAddress, bindAddress->length());
for (uint16_t i = first; i <= last; ++i) {
sa.set_port(i);
if (get_fd().bind(sa) && get_fd().listen(50)) {
...
in libtorrent/src/net/listen.cc. That function was called by:
bool
ConnectionManager::listen_open(port_type begin, port_type end) {
if (!m_listen->open(begin, end, rak::socket_address::cast_from(m_bindAddress)))
return false;
m_listenPort = m_listen->port();
return true;
}
in libtorrent/src/torrent/connection_manager.cc, and it was itself
called by Manager::listen_open() in rtorrent/core/manager.cc, which
throws the error message I got because the call to
torrent::connection_manager()->listen_open(portFirst, portLast)
fails.
So the question now is to find how the m_bindAddress used in
ConnectionManager::listen_open is set, but I prefer not to do that right
now.
> Did you try contacting the developer?
I've put him in the Cc: since the first message.
Fabienne
prev parent reply other threads:[~2011-06-22 23:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 12:40 net/ipv4: commit d0733d2e29b breaks rtorrent Fabienne Ducroquet
2011-06-22 12:47 ` Marcus Meissner
2011-06-22 13:24 ` Reinhard Max
2011-06-22 14:51 ` Fabienne Ducroquet
2011-06-22 14:58 ` Reinhard Max
2011-06-22 15:53 ` Stephen Hemminger
2011-06-22 23:02 ` Fabienne Ducroquet [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110622230239.GA5009@localhost \
--to=fabiduc@gmail.com \
--cc=davem@davemloft.net \
--cc=max@suse.de \
--cc=meissner@suse.de \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=sundell.software@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.