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

Ipv6 bootnodes #138

Merged
merged 2 commits into from Jul 14, 2017
Merged

Ipv6 bootnodes #138

merged 2 commits into from Jul 14, 2017

Conversation

m-sossich
Copy link
Contributor

No description provided.

Copy link

@juli juli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main objective is achieved: IPv6 addresses can be specified without generating parsing errors.

public class IpUtils {
private static final Logger logger = LoggerFactory.getLogger(IpUtils.class);

private static final String IPV6_INPUT_FORMAT = "^\\[(.*)\\]:([0-9]{1,})";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Square brackets are not mandatory for IPv6 addresses if they are not part of an URL or if a port number is not specified. But if there won't be a default port for nodes then it is correct.
  • Second group of regex for port number could limit to 5 digits and allow IPs without port


private static final String IPV6_WITH_PORT = "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443";
private static final String IPV6_NO_PORT = "[2001:db8:85a3:8d3:1319:8a2e:370:7348]";
private static final String IPV6_INVALID = "2001:db8:85a3:8d3:1319:8a2e:370:7348";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This IPv6 address is valid if square brackets are not mandatory.

@aeidelman aeidelman changed the base branch from master to ginger July 14, 2017 14:59
@aeidelman aeidelman merged commit be682f2 into ginger Jul 14, 2017
@bcodesido bcodesido deleted the ipv6_bootnodes branch July 14, 2017 18:33
@aeidelman aeidelman restored the ipv6_bootnodes branch January 4, 2018 06:09
@diega diega deleted the ipv6_bootnodes branch January 4, 2018 06:21
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.

None yet

4 participants