Skip to content

Support IPv6 in routing procedure responses #392

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

Merged
merged 3 commits into from
Jul 20, 2017

Conversation

lutovich
Copy link
Contributor

This PR improves parsing in BoltServerAddress to support IPv6 in getServers() and getRoutingTable() procedure responses.

This commit improves parsing in `BoltServerAddress` to support
IPv6 in `getServers()` and `getRoutingTable()` procedure responses.
}

@Test
public void shouldParseIPv6Addresses()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you try also with zone-id like [fe80::b279:2f%en0]:1234 ?

@@ -63,7 +63,7 @@ public void shouldReceiveServerInfoAfterInit() throws Throwable
SocketClient socket = mock( SocketClient.class );
SocketConnection conn = new SocketConnection( socket, SERVER_INFO, DEV_NULL_LOGGER );

when( socket.address() ).thenReturn( BoltServerAddress.from( URI.create( "http://neo4j.com:9000" ) ) );
when( socket.address() ).thenReturn( new BoltServerAddress( URI.create( "http://neo4j.com:9000" ) ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated, but why is this http:// ?

@martinfurmanski
Copy link
Contributor

In the server code I handle the hostname string representation as only ::1 and not as [::1]. Only when combined in some form are the brackets used, e.g. bolt://[::1]:1234 or in config [fe80::1]:1234 etc. Just for consideration.

To support IPv6 with and without brackets and zone ids.
@lutovich
Copy link
Contributor Author

@martinfurmanski comments should now be addressed

@lutovich
Copy link
Contributor Author

@martinfurmanski, @ali-ince thanks for the review! Merging...

@lutovich lutovich merged commit 75cb8a4 into neo4j:1.4 Jul 20, 2017
@lutovich lutovich deleted the 1.4-ipv6-in-routing branch July 20, 2017 12:54
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.

3 participants