Hadoop QA commented on ZOOKEEPER-530:

-1 overall.  Here are the results of testing the latest attachment 
  against trunk revision 826787.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified 
                        Please justify why no tests are needed for this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac 
compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of 
release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: 
Findbugs warnings: 
Console output: 

This message is automatically generated.

> Memory corruption: Zookeeper c client IPv6 implementation does not honor 
> struct sockaddr_in6 size
> -------------------------------------------------------------------------------------------------
>                 Key: ZOOKEEPER-530
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-530
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: c client
>    Affects Versions: 3.2.0, 3.2.1
>            Reporter: Isabel Drost
>            Assignee: Isabel Drost
>             Fix For: 3.3.0
>         Attachments: ZOOKEEPER-530.patch, ZOOKEEPER-530.patch
> I tried to run zookeeper c-client on a machine with IPv6 enabled. When 
> connecting to the IPv6 address a connect(...) gave a "Address family not 
> supported by protocol" error. The reason was, that a few lines earlier, the 
> socket was opened with PF_INET instead of PF_INET6. Changing that the 
> following way:
> {code}
>            if (zh->addrs[zh->connect_index].sa_family == AF_INET) {
>               zh->fd = socket(PF_INET, SOCK_STREAM, 0);
>             } else {
>               zh->fd = socket(PF_INET6, SOCK_STREAM, 0);
>             }
> {code}
> turned the error message into "Invalid argument". 
> When printing out sizeof(struct sockaddr), sizeof(struct sockaddr_in) and 
> sizeof(struct sockaddr_in6) I got sockaddr: 16, sockaddr_in: 16 and 
> sockaddr_in6: 28. 
> So in the code calling 
> {code}
>            connect(zh->fd, &zh->addrs[zh->connect_index], sizeof(struct 
> sockaddr_in));
> {code}
> the parameter address_len is too small.
> Same applies to how IPv6 addresses are handled in the function 
> getaddrs(zhandle_t *zh).
> (Big Thanks+kiss to Thilo Fromm for helping me debug this.)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to