peertracker icon indicating copy to clipboard operation
peertracker copied to clipboard

ignore invalid ipv4 addresses

Open JonnyJD opened this issue 11 years ago • 3 comments

We can't handle ipv6 addresses, so we ignore them if given as parameter. We use the IP of the remote given with the connection. That is either ipv4, when listening on ipv4 or it is not and we fail later.

JonnyJD avatar Nov 16 '14 22:11 JonnyJD

I have a "dual stack" connection, running ipv4 and ipv6, using ipv6 where available.

KTorrent is sending my ipv6 address in the query, leading to the error invalid ip, dotted decimal only and no entry in the peers list.

JonnyJD avatar Nov 16 '14 22:11 JonnyJD

I (still) do not intend to fully maintain peertracker, but I wanted to make this fix available.

I only fixed this in the "mysql branch". This still needs fixing in the postgres and sqlite "braches" and the actual fix would probably be to not duplicate that part of the code..

JonnyJD avatar Nov 16 '14 22:11 JonnyJD

I am not saying KTorrent does the right thing, but handling this case in this way shouldn't hurt.

See also http://www.bittorrent.org/beps/bep_0007.html for "real" ipv6 handling.

JonnyJD avatar Nov 16 '14 23:11 JonnyJD