Public bug reported:

This bug has also been reported to debian [1].

1) lsb_release -rd
Description:    Ubuntu 18.10
Release:        18.10

2) dpkg -l | grep libtorrent
ii  libtorrent-rasterbar9                      1.1.9-1                          
    amd64        C++ bittorrent library by Rasterbar Software
ii  python-libtorrent                          1.1.9-1                          
    amd64        Python bindings for libtorrent-rasterbar

* What led up to the situation?

My system has both IPv4 and IPv6 connections and I used deluged with
libtorrent to get the debian-9.5.0-amd64-netinst.iso .

* What exactly did you do (or not do) that was effective (or
ineffective)?

When I did an update tracker, I saw that 2 announce messages are sent.
One to the tracker's IPv4 address and one to the tracker's IPv6 address, but 
the last one sent port=0 instead of the correct portnumber.
The order might change (first IPv6 and then IPv4).

* What was the outcome of this action?

I did a tcpdump of the connection to the debian tracker and saw the
following data:

To 130.239.18.159 on port 6969:
..`.NGD.GET 
/announce?info_hash=%3b%1d%85%f8x%0e%f8%c4%d8S%8f%80%9azc%fcR%991%8e&peer_id=-DE13F0-a7HtrDr99EyW&port=28741&uploaded=0&downloaded=0&left=0&corrupt=0&key=EBA0497F&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0
 HTTP/1.1
Host: bttracker.debian.org:6969
User-Agent: Deluge 1.3.15
Accept-Encoding: gzip
Connection: close

and to 2001:6b0:e:2018::159 on port 6969:
..5ENGD.GET 
/announce?info_hash=%3b%1d%85%f8x%0e%f8%c4%d8S%8f%80%9azc%fcR%991%8e&peer_id=-DE13F0-a7HtrDr99EyW&port=0&uploaded=0&downloaded=0&left=0&corrupt=0&key=EBA0497F&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0
 HTTP/1.1
Host: bttracker.debian.org:6969
User-Agent: Deluge 1.3.15
Accept-Encoding: gzip
Connection: close

Here you can see the port=0 part of the announce message, which will
make the tracker think the client is listening on port 0, but it is not.

* What outcome did you expect instead?
I would expect that both the IPv4 and IPv6 announce messages would send the 
correct port

* Additional information
This issue has also been reported to upstream as #3306 [2] and has been fixed 
with PR #3385 [3]. And it will be available in the next 1.1.X release.
I've added the patch that can be applied to fix the issue.


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911107
[2] https://github.com/arvidn/libtorrent/issues/3306
[3] https://github.com/arvidn/libtorrent/pull/3385

** Affects: libtorrent-rasterbar (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: ipv6

** Patch added: "fix the port=0 issue"
   
https://bugs.launchpad.net/bugs/1801164/+attachment/5207977/+files/fix_port0_announce.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1801164

Title:
  libtorrent sends port=0 via IPv6 announce instead of the correct port

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libtorrent-rasterbar/+bug/1801164/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to