Package: chrony
Version: 1.23-6+lenny1
Severity: normal

This fixes chronyc access to remote hosts:
>From: Thomas Zajic <zlatko zlatko fdns net>
Date: Tue, 29 Jul 2008 23:35:42 +0100
Subject: [PATCH] Fix IP addressing in chronyc

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.
---
 client.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/client.c b/client.c
index 85d6e84..66f297f 100644
--- a/client.c
+++ b/client.c
@@ -163,10 +163,10 @@ get_address(const char *hostname)
     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;
-- 


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages chrony depends on:
ii  libc6                       2.7-18lenny2 GNU C Library: Shared libraries
ii  libreadline5                5.2-3.1      GNU readline and history libraries
ii  timelimit                   1.1-3        Simple utility to limit a process'
ii  ucf                         3.0016       Update Configuration File: preserv

Versions of packages chrony recommends:
ii  udev                      0.125-7+lenny3 /dev/ and hotplug management daemo

chrony suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to