Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Key parameter in the requests differs when it should be the same #11858
qBittorrent version and Operating System
If on linux, libtorrent-rasterbar and Qt version
What is the problem
On some trackers the download counted twice. I dug into the problem and studied out that when both ipv4 and ipv6 is enabled and tracker has both addresses qbittorrent sends duplicated requests to each of these addresses. But the 'key' parameter of these requests is differed (see example below).
I think this cause miscalculation of the downloaded (possibly uploaded too) value on some trackers.
What is the expected behavior
The 'key' parameter is equal in requests that contain the same information.
Steps to reproduce
Extra info(if any)
This is example. I replaced all possibly sensitive values by theirs names.
thanks for pinging me on this one. This is related to an issue that was brought up recently, here.
Taking another pass over the code to generate the key, it is deliberately kept unique per listen interface. I'm not sure this is a good idea. The rationale behind it is the idea that
i.e. mistake a multi-homed peer for a peer that changed its IP.
I don't think there's a clear-cut solution to this (yet). I'm really interested in hearing ideas. Clearly the other side of that is that the tracker will want to know whether it's the same peer or not too. It could use the