Date: Sun, 19 Aug 2001 00:53:02 -0700 (PDT) From: Steve Whiteley <stevew@wrcad.com> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/29867: 4.3 timed master can't sync Red Hat Linux 6.0 box Message-ID: <200108190753.f7J7r2J31957@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 29867
>Category: misc
>Synopsis: 4.3 timed master can't sync Red Hat Linux 6.0 box
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 19 01:00:08 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Steve Whiteley
>Release: 4.3-stable
>Organization:
Whiteley Research Inc.
>Environment:
FreeBSD chaucer.srware.com 4.3-RC FreeBSD 4.3-RC #2:
Sun Apr 22 14:16:02 PDT 2001 stevew@chaucer.srware.com:/usr3/obj/usr/src/sys/CHAUCER i386
>Description:
Running timed as master, to synchronize a Red Hat Linux 6.0 box. This
worked with FBSD3.5, after upgrading to 4.3, got console error
"short packet (xx/xx bytes) from keats"
(The real message included the byte counts.)
There appeared to be no clock sync.
>How-To-Repeat:
boot and run
>Fix:
The problem is that the sizeof(struct tsp) differs on the two systems.
Made the following change in readmsg.c near line 215, which seems to have fixed the problem.
----------------------------------------------------------------------
length = sizeof(from);
if ((n = recvfrom(sock, (char *)&msgin, sizeof(struct tsp), 0,
(struct sockaddr*)&from, &length)) < 0) {
syslog(LOG_ERR, "recvfrom: %m");
exit(1);
}
/* SRW */
/* Here is a bug: the sizeof(struct tsp) is OS dependent, depending on the
* length of the tsp_name field (MAXHOSTNAMELEN) which is, e.g., 256 for
* FreeBSD 4.3 and 64 for RH Linux 6.0. Keep this as a sanity check,
* but assume that the name field is 64 or larger
*/
if (n < (ssize_t)sizeof(struct tsp) - MAXHOSTNAMELEN + 64) {
/*
if (n < (ssize_t)sizeof(struct tsp)) {
*/
syslog(LOG_NOTICE,
"short packet (%u/%u bytes) from %s",
n, sizeof(struct tsp),
inet_ntoa(from.sin_addr));
continue;
}
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108190753.f7J7r2J31957>
