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

ZOOKEEPER-3878: Client connection fails if IPV6 is not enclosed in square brackets #1398

Closed
wants to merge 1 commit into from
Closed

ZOOKEEPER-3878: Client connection fails if IPV6 is not enclosed in square brackets #1398

wants to merge 1 commit into from

Conversation

arshadmohammad
Copy link
Contributor

@arshadmohammad arshadmohammad commented Jul 11, 2020

No description provided.

host = hostAndPort[0];
if (hostAndPort.length == 2) {
port = Integer.parseInt(hostAndPort[1]);
}
} catch (ConfigException e) {
e.printStackTrace();
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this part of the logic is not inside
NetUtils.getIPV6HostAndPort(host) ?
What about pushing it up there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to make getIPV6HostAndPort API more generic so it can be used other places as well for example it can be used to input of host:port:port and [host]:port:port as well. If we move above said logic to getIPV6HostAndPort host:port:port will give wrong result; So I wanted to keep only common logic in getIPV6HostAndPort.

Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense to me

host = hostAndPort[0];
if (hostAndPort.length == 2) {
port = Integer.parseInt(hostAndPort[1]);
}
} catch (ConfigException e) {
e.printStackTrace();
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

makes sense to me

@eolivelli eolivelli changed the title ZOOKEEPER-3878: Client connection fails if IPV6 is not enclosed in sq… ZOOKEEPER-3878: Client connection fails if IPV6 is not enclosed in square brackets Jul 13, 2020
eolivelli pushed a commit that referenced this pull request Jul 13, 2020
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes #1398 from arshadmohammad/ZOOKEEPER-3878-master

(cherry picked from commit f362313)
Signed-off-by: Enrico Olivelli <eolivelli@apache.org>
@eolivelli eolivelli closed this in f362313 Jul 13, 2020
@eolivelli
Copy link
Contributor

I have cherry-picked this patch to branch-3.6.
It does not cherry-pick to branch-3.5
if you are interested in picking it to that release branch then please send another PR

IMO we can just pick it to 3.6, hopefully we will cut a new release soon on 3.6.x

@arshadmohammad
Copy link
Contributor Author

This scenario is not a bug in branch-3.5. It is an improvement there. But I think it is good to be in sync.
Have create jira https://issues.apache.org/jira/browse/ZOOKEEPER-3886 and raised PR #1400

stickyhipp pushed a commit to stickyhipp/zookeeper that referenced this pull request Aug 19, 2020
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1398 from arshadmohammad/ZOOKEEPER-3878-master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1398 from arshadmohammad/ZOOKEEPER-3878-master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1398 from arshadmohammad/ZOOKEEPER-3878-master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Aug 31, 2022
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1398 from arshadmohammad/ZOOKEEPER-3878-master
RokLenarcic pushed a commit to RokLenarcic/zookeeper that referenced this pull request Sep 3, 2022
…uare brackets

Author: Mohammad Arshad 72626 <mohammad.arshad@huawei.com>

Reviewers: Enrico Olivelli <eolivelli@apache.org>

Closes apache#1398 from arshadmohammad/ZOOKEEPER-3878-master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants