summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2008-06-10 03:46:10 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2008-06-10 03:46:10 +0000
commit2cfc51272e42f900535e789491b04ac34dd5125f (patch)
tree035f7d6d1d293e2d12ea7768ebad4d76f432a8bc
parentfeaa668f73c2ceb6477df152becd63debd7d1edc (diff)
According to the latest SNTPv4 spec in RFC4330, secondary servers
return the address of the synchronization source as reference identification. Remove the obsolete special casing specified in RFC2030. ok henning@
-rw-r--r--usr.sbin/ntpd/client.c3
-rw-r--r--usr.sbin/ntpd/ntp.c3
-rw-r--r--usr.sbin/ntpd/ntpd.h3
-rw-r--r--usr.sbin/ntpd/sensors.c3
-rw-r--r--usr.sbin/ntpd/server.c8
5 files changed, 6 insertions, 14 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index 0eae0c5bbcc..92a5199d5a2 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.79 2008/01/28 11:45:59 mpf Exp $ */
+/* $OpenBSD: client.c,v 1.80 2008/06/10 03:46:09 naddy Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -263,7 +263,6 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
p->reply[p->shift].status.rootdelay = sfp_to_d(msg.rootdelay);
p->reply[p->shift].status.rootdispersion = sfp_to_d(msg.dispersion);
p->reply[p->shift].status.refid = ntohl(msg.refid);
- p->reply[p->shift].status.refid4 = msg.xmttime.fractionl;
p->reply[p->shift].status.reftime = lfp_to_d(msg.reftime);
p->reply[p->shift].status.poll = msg.ppoll;
p->reply[p->shift].status.stratum = msg.stratum;
diff --git a/usr.sbin/ntpd/ntp.c b/usr.sbin/ntpd/ntp.c
index bffd75e4c2e..46593c1727b 100644
--- a/usr.sbin/ntpd/ntp.c
+++ b/usr.sbin/ntpd/ntp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntp.c,v 1.105 2008/06/08 19:14:40 ckuethe Exp $ */
+/* $OpenBSD: ntp.c,v 1.106 2008/06/10 03:46:09 naddy Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -576,7 +576,6 @@ priv_adjtime(void)
conf->status.stratum++; /* one more than selected peer */
update_scale(offset_median);
- conf->status.refid4 = offsets[i]->status.refid4;
conf->status.refid = offsets[i]->status.send_refid;
free(offsets);
diff --git a/usr.sbin/ntpd/ntpd.h b/usr.sbin/ntpd/ntpd.h
index 1f80c383d8f..71f7544302a 100644
--- a/usr.sbin/ntpd/ntpd.h
+++ b/usr.sbin/ntpd/ntpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ntpd.h,v 1.94 2008/06/09 18:30:48 deraadt Exp $ */
+/* $OpenBSD: ntpd.h,v 1.95 2008/06/10 03:46:09 naddy Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -97,7 +97,6 @@ struct ntp_status {
double rootdispersion;
double reftime;
u_int32_t refid;
- u_int32_t refid4;
u_int32_t send_refid;
u_int8_t synced;
u_int8_t leap;
diff --git a/usr.sbin/ntpd/sensors.c b/usr.sbin/ntpd/sensors.c
index 0307681fbc0..e8f3a6185fe 100644
--- a/usr.sbin/ntpd/sensors.c
+++ b/usr.sbin/ntpd/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.39 2008/06/09 18:30:48 deraadt Exp $ */
+/* $OpenBSD: sensors.c,v 1.40 2008/06/10 03:46:09 naddy Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@@ -191,7 +191,6 @@ sensor_query(struct ntp_sensor *s)
s->offsets[s->shift].good = 1;
s->offsets[s->shift].status.refid = s->refid;
- s->offsets[s->shift].status.refid4 = s->refid;
s->offsets[s->shift].status.stratum = 0; /* increased when sent out */
s->offsets[s->shift].status.rootdelay = 0;
s->offsets[s->shift].status.rootdispersion = 0;
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c
index 3429aa011b5..6156d522914 100644
--- a/usr.sbin/ntpd/server.c
+++ b/usr.sbin/ntpd/server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server.c,v 1.31 2007/01/15 08:19:11 otto Exp $ */
+/* $OpenBSD: server.c,v 1.32 2008/06/10 03:46:09 naddy Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -162,11 +162,7 @@ server_dispatch(int fd, struct ntpd_conf *lconf)
reply.xmttime = d_to_lfp(gettime_corrected());
reply.orgtime = query.xmttime;
reply.rootdelay = d_to_sfp(lconf->status.rootdelay);
-
- if (version > 3)
- reply.refid = lconf->status.refid4;
- else
- reply.refid = lconf->status.refid;
+ reply.refid = lconf->status.refid;
ntp_sendmsg(fd, (struct sockaddr *)&fsa, &reply, size, 0);
return (0);