Thomas wrote:
I found a bug in the chrony client (chronyc) that affects its ability to talk
to remote hosts over the control port (323/udp).
For example, running "chronyc -h 192.168.1.3 sources -v" would just sit there
and hang, and eventually timeout. I found out with tcpdump that chronyc
actually tries to connect to 255.168.1.3 instead of 192.168.1.3.
exit(1);
} else {
address0 = host->h_addr_list[0];
- result = ((((unsigned long) address0[0]) << 24) |
- (((unsigned long) address0[1]) << 16) |
- (((unsigned long) address0[2]) << 8) |
- (((unsigned long) address0[3])));
+ result = ((((unsigned long) address0[0] & 0xff) << 24) |
+ (((unsigned long) address0[1] & 0xff) << 16) |
+ (((unsigned long) address0[2] & 0xff) << 8) |
+ (((unsigned long) address0[3] & 0xff)));
}
return result;