Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/puppeth: use dumb textual IP filtering #15269

Merged
merged 1 commit into from
Oct 12, 2017

Conversation

karalabe
Copy link
Member

Puppeth until now supported blacklisting ethstats peers via their IP addresses by maintaining a slice of Go net.IP addresses and flattening it into a string list for the docker config.

Unfortunately ethstats uses plain string comparison for IP banning, and Go uses a different IP formatting scheme than nodejs (IPv6 addresses in Go get shortened if they contain :0:0:0:0 ending to ::). As such, parsing the user input into net.IP and later converting to string will mismatch the comparison. This PR dumbs down the blacklist to use []string instead of []net.IP.

Alongside the change, the PR also introduces a bit finer blacklist manipulation support so that Puppeth admins don't have to reconstruct the blacklist every single time they want to add/remove an entry to/from it.

@karalabe karalabe added this to the 1.7.2 milestone Oct 10, 2017
@karalabe karalabe merged commit 8d8034f into ethereum:master Oct 12, 2017
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.

2 participants