[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Tyulbashev updated ZOOKEEPER-3726:
--------------------------------------------
    Description: 
Zookeeper C Client periodically resolves server names since 
https://issues.apache.org/jira/browse/ZOOKEEPER-1355

After dns resolution ip addresses are checked against previous set of 
addresses. However, currently only several bytes are checked (it is assumed, 
that all addresses are ipv4 length bytes).

Case:
 1) zookeeper server operates only by ipv6
 2) client connects to it by some hostname (zookeeper-1.news.yandex.ru, for 
example)
 3) container with zookeeper server dies, new container is up, and 
zookeeper-1.news.yandex.ru now points to new address
 4) several bits in ipv6 address are changed
 5) zookeeper client ignores changes in address, because of incorrect strcmp 
size and first bytes were equal
 6) zookeeper client now can't reconnect to zookeeper without manual 
intervention, because it tries old address

This is proposed fix: [https://github.com/apache/zookeeper/pull/1252]

  was:
Zookeeper C Client periodically resolves server names since 
https://issues.apache.org/jira/browse/ZOOKEEPER-1355

After dns resolution ip addresses are checked against previous set of 
addresses. However, currently only several bytes are checked (it is assumed, 
that all addresses are ipv4 length bytes).

Case:
1) zookeeper server operates only by ipv6
2) client connects to it by some hostname (zookeeper-1.news.yandex.ru, for 
example)
3) container with zookeeper server dies, new container is up, and 
zookeeper-1.news.yandex.ru now points to new address
4) several bits in ipv6 address are changed
5) zookeeper client ignores changes in address, because of incorrect strcmp 
size and first bytes were equal
6) zookeeper client now can't reconnect to zookeeper without manual 
intervention, because it tries old address

pull request will be available shortly


> invalid ipv6 address comparison
> -------------------------------
>
>                 Key: ZOOKEEPER-3726
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3726
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.5.6
>            Reporter: Vladislav Tyulbashev
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Zookeeper C Client periodically resolves server names since 
> https://issues.apache.org/jira/browse/ZOOKEEPER-1355
> After dns resolution ip addresses are checked against previous set of 
> addresses. However, currently only several bytes are checked (it is assumed, 
> that all addresses are ipv4 length bytes).
> Case:
>  1) zookeeper server operates only by ipv6
>  2) client connects to it by some hostname (zookeeper-1.news.yandex.ru, for 
> example)
>  3) container with zookeeper server dies, new container is up, and 
> zookeeper-1.news.yandex.ru now points to new address
>  4) several bits in ipv6 address are changed
>  5) zookeeper client ignores changes in address, because of incorrect strcmp 
> size and first bytes were equal
>  6) zookeeper client now can't reconnect to zookeeper without manual 
> intervention, because it tries old address
> This is proposed fix: [https://github.com/apache/zookeeper/pull/1252]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to