Browse Source

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
OPENBSD_3_6
henning 20 years ago
parent
commit
fd5d60e4e2
1 changed files with 2 additions and 5 deletions
  1. +2
    -5
      src/usr.sbin/ntpd/client.c

+ 2
- 5
src/usr.sbin/ntpd/client.c View File

@ -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:


Loading…
Cancel
Save