summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd/client.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-07-07 06:50:41 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-07-07 06:50:41 +0000
commit427dfb368bd81244c5b1127d059320e1fd46e9ff (patch)
treecbc3822c65ba046390f023a8a308aa1b286f215a /usr.sbin/ntpd/client.c
parent7368b6725822ff86420f88b94a4f516a97e128e1 (diff)
if the cookie in the received packet doesn't match discard it silently;
the logging was useful for development but is a bad idea in production use as a remote attacker could flood your logs
Diffstat (limited to 'usr.sbin/ntpd/client.c')
-rw-r--r--usr.sbin/ntpd/client.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index 81d7eb8698f..da30417faf5 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.12 2004/07/07 01:01:27 henning Exp $ */
+/* $OpenBSD: client.c,v 1.13 2004/07/07 06:50:40 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -113,11 +113,8 @@ client_dispatch(struct ntp_peer *p)
ntp_getmsg(buf, size, &msg);
if (msg.orgtime.int_part != p->query->msg.xmttime.int_part ||
- msg.orgtime.fraction != p->query->msg.xmttime.fraction) {
- log_warnx("received packet from %s without correct cookie, "
- "discarding", log_sockaddr((struct sockaddr *)&fsa));
+ msg.orgtime.fraction != p->query->msg.xmttime.fraction)
return (0);
- }
/*
* From RFC 2030: