Subject: bin/27210: "ntpd"'s NEMA driver has 8 units, but MAX_UNITS is #defined as 4
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <paul@Plectere.com>
List: netbsd-bugs
Date: 10/10/2004 11:20:13
>Number: 27210
>Category: bin
>Synopsis: "ntpd"'s NEMA driver has 8 units, but MAX_UNITS is #defined as 4
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 10 18:21:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Paul Shupak
>Release: NetBSD 2.99.9
>Organization:
>Environment:
System: NetBSD cobalt 2.99.9 NetBSD 2.99.9 (COBALT-$Revision: 1.4 $) #730: Fri Oct 8 22:00:40 PDT 2004 root@svcs:/sys/arch/i386/compile/COBALT i386
Architecture: i386
Machine: i386
>Description:
Examine driver20 (NEMA) and not that 3 bits are defined to construct
8 different "units" (127.127.20.[0-7]), but using any units which index greater
than 3 cause ntpd to crash of exit (depending on other config file settings).
>How-To-Repeat:
Try to use refclock 127.127.20.7.
>Fix:
Index: src/dist/ntpd/ntp_refclock.c
===================================================================
RCS file: /cvsroot/src/dist/ntp/ntpd/ntp_refclock.c,v
retrieving revision 1.2
diff -c -r1.2 ntp_refclock.c
*** src/dist/ntpd/ntp_refclock.c 4 Dec 2003 16:23:37 -0000 1.2
--- src/dist/ntpd/ntp_refclock.c 10 Oct 2004 18:13:32 -0000
***************
*** 72,77 ****
* This interface is strongly discouraged and may be abandoned in
* future.
*/
! #define MAXUNIT 4 /* max units */
#define FUDGEFAC .1 /* fudge correction factor */
--- 72,77 ----
* This interface is strongly discouraged and may be abandoned in
* future.
*/
! #define MAXUNIT 8 /* max units */
#define FUDGEFAC .1 /* fudge correction factor */
>Release-Note:
>Audit-Trail:
>Unformatted: