Skip to content

ignore invalid ipv4 addresses#1

Open
JonnyJD wants to merge 1 commit into
masterfrom
ipv6
Open

ignore invalid ipv4 addresses#1
JonnyJD wants to merge 1 commit into
masterfrom
ipv6

Conversation

@JonnyJD

@JonnyJD JonnyJD commented Nov 16, 2014

Copy link
Copy Markdown
Owner

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.

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

JonnyJD commented Nov 16, 2014

Copy link
Copy Markdown
Owner Author

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

JonnyJD commented Nov 16, 2014

Copy link
Copy Markdown
Owner Author

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

JonnyJD commented Nov 16, 2014

Copy link
Copy Markdown
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant