diff options
author | Alexander Guy <alexander@cvs.openbsd.org> | 2004-07-13 17:27:58 +0000 |
---|---|---|
committer | Alexander Guy <alexander@cvs.openbsd.org> | 2004-07-13 17:27:58 +0000 |
commit | 71bbe64c48f4612eef8c751783dd284b3bbc2c33 (patch) | |
tree | 5c0693dfe075f594e3ca60f6f44ea2c7a50974c9 /usr.sbin | |
parent | 423a9cd9f2809b5aad20b7e73ca95a3fcdcd3612 (diff) |
ignore obviously malformed queries; ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/server.c b/usr.sbin/ntpd/server.c index ea202f6ce18..31a5ad24bc1 100644 --- a/usr.sbin/ntpd/server.c +++ b/usr.sbin/ntpd/server.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.8 2004/07/11 03:05:50 dtucker Exp $ */ +/* $OpenBSD: server.c,v 1.9 2004/07/13 17:27:57 alexander Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -108,7 +108,8 @@ server_dispatch(int fd) rectime = gettime(); - ntp_getmsg(buf, size, &query); + if (ntp_getmsg(buf, size, &query) == -1) + return (0); bzero(&reply, sizeof(reply)); reply.status = 0 | (query.status & VERSIONMASK); |