Article View: comp.protocols.time.ntp
Article #772xntpd (from louie.udel.edu) mishandles broadcast delay
From: Jim Mattson
Date: Sat, 04 May 1991 06:30
Date: Sat, 04 May 1991 06:30
97 lines
2944 bytes
2944 bytes
On a machine listening to broadcast ntp, where the broadcast delay is set to
0.06 seconds, xntpdc sysinfo shows:
broadcast delay: 0.000000915490
(On the same machine, if no broadcast delay is specified, xntpdc sysinfo
shows the expected default: broadcast delay: 0.007999999914)
It seems that the broadcast delay parameter should be handled the same way
as the authdelay parameter, so I took the code from there, and now it seems
to work.
--jim
BTW, I chose 0.06 seconds because that was the delay xntpdc reported when I
was running as a peer rather than a broadcast client. Is this value
meaningful? It seems odd that it's an order of magnitude higher than the
default value.
*** /tmp/RCSAa09736 Sat May 4 00:11:08 1991
--- ntp_config.c Sun Apr 28 16:05:03 1991
***************
*** 394,400 ****
case 'r':
do {
l_fp tmp;
- u_fp utmp;
if (!atolfp(optarg, &tmp)) {
syslog(LOG_ERR,
--- 394,399 ----
***************
*** 405,412 ****
"command line broadcast delay value %s is unlikely",
optarg);
} else {
! utmp = LFPTOFP(&tmp);
! proto_config(PROTO_BROADDELAY, utmp);
}
} while (0);
break;
--- 404,410 ----
"command line broadcast delay value %s is unlikely",
optarg);
} else {
! proto_config(PROTO_BROADDELAY, tmp.l_f);
}
} while (0);
break;
***************
*** 734,740 ****
case CONFIG_BDELAY:
if (ntokens >= 2) {
l_fp tmp;
- u_fp utmp;
if (!atolfp(tokens[1], &tmp)) {
syslog(LOG_ERR,
--- 732,737 ----
***************
*** 745,752 ****
"broadcastdelay value %s is unlikely",
tokens[1]);
} else {
! utmp = LFPTOFP(&tmp);
! proto_config(PROTO_BROADDELAY, utmp);
}
}
break;
--- 742,748 ----
"broadcastdelay value %s is unlikely",
tokens[1]);
} else {
! proto_config(PROTO_BROADDELAY, tmp.l_f);
}
}
break;
*** /tmp/RCSAa09744 Sat May 4 00:11:24 1991
--- ntp_proto.c Sun Apr 28 16:08:03 1991
***************
*** 1921,1927 ****
/*
* Set default broadcast delay
*/
! sys_bdelay = (u_fp)value;
break;
case PROTO_AUTHENTICATE:
--- 1921,1927 ----
/*
* Set default broadcast delay
*/
! sys_bdelay = (((u_long)value) + 0x00000800) & 0xfffff000;
break;
case PROTO_AUTHENTICATE:
Technical Details
Message-ID:
<9105040730.AA09923@beowulf.ucsd.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!ucbvax!UCSD.EDU!jmattsonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!stanford.edu!agate!ucbvax!UCSD.EDU!jmattson From: jmattson@UCSD.EDU (Jim Mattson) Newsgroups: comp.protocols.time.ntp Subject: xntpd (from louie.udel.edu) mishandles broadcast delay Message-ID: <9105040730.AA09923@beowulf.ucsd.edu> Date: 4 May 91 06:30:44 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 97