Public bug reported:

Clockdiff calls getpid() to get a unique id and stores it into an int
named "id".  This id is then stored into a 16 bit field in packets it
sends out, and when it receives replies it compares the received id with
the int "id" to determine if the packet should be discarded or not.

If getpid() returns a pid higher than 65535, all packets are discarded.

I fixed it with a patch like this:


diff --git a/clockdiff.c b/clockdiff.c
index 00b8d33..8a03419 100644
--- a/clockdiff.c
+++ b/clockdiff.c
@@ -95,7 +95,7 @@ int in_cksum(u_short *addr, int len)
 
 
 int interactive = 0;
-int id;
+u_int16_t id;
 int sock;
 int sock_raw;
 struct sockaddr_in server;

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: iputils-clockdiff 3:20100418-2ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-32.66-generic 2.6.35.14
Uname: Linux 2.6.35-32-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Mar 16 22:32:57 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: iputils

** Affects: iputils (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug maverick

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/957449

Title:
  clockdiff fails if its pid is over 65535

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iputils/+bug/957449/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to