diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-08-10 13:48:37 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2005-08-10 13:48:37 +0000 |
commit | 834485d65942707377a860589f0a7f6f354be616 (patch) | |
tree | 9207e08bd2f95bca25eb676e7798a4227d6b5959 /usr.sbin/ntpd/server.c | |
parent | be5daa4e25b05de74a3ef100f7b7e4c30097423c (diff) |
Propogate server's leap indicator flags to clients; ok henning@
Diffstat (limited to 'usr.sbin/ntpd/server.c')
-rw-r--r-- | usr.sbin/ntpd/server.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index d8b78151839..e580fb0dca2 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.24 2005/07/22 08:58:56 dtucker Exp $ */ +/* $OpenBSD: server.c,v 1.25 2005/08/10 13:48:36 dtucker Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -131,7 +131,11 @@ server_dispatch(int fd, struct ntpd_conf *conf) version = (query.status & VERSIONMASK) >> 3; bzero(&reply, sizeof(reply)); - reply.status = conf->status.leap | (query.status & VERSIONMASK); + if (conf->status.synced) + reply.status = conf->status.leap; + else + reply.status = LI_ALARM; + reply.status |= (query.status & VERSIONMASK); if ((query.status & MODEMASK) == MODE_CLIENT) reply.status |= MODE_SERVER; else |