clockdiff fails if its pid is over 65535
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
iputils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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
ProcVersionSign
Uname: Linux 2.6.35-32-generic x86_64
NonfreeKernelMo
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
THIS BUG IS FIXED in every version _AFTER_ 08.11.2012 (commit 7eef4fa8946ae7d c235d1af86e5d6d ed46f21835 ).
Please CLOSE.