From: Danny Mayer Date: Tue, 9 Feb 2016 00:46:57 +0000 (+0000) Subject: Allow Active and Passive peer for crypto-NAK and added reporting X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7de591c494035e6de9b16fcedbe8e1fc63837664;p=thirdparty%2Fntp.git Allow Active and Passive peer for crypto-NAK and added reporting bk: 56b93701Ha8cv0gyWqIg69A7EfN6QA --- diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 6d6658b31..ec6acd95a 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -292,7 +292,10 @@ valid_NAK( * Only server responses can contain NAK's */ - if (hismode != MODE_SERVER) { + if (hismode != MODE_SERVER && + hismode != MODE_ACTIVE && + hismode != MODE_PASSIVE + ) { return (INVALIDNAK); } @@ -838,8 +841,9 @@ receive( * Drop any invalid crypto-NAKs */ if (crypto_nak_test == INVALIDNAK) { + report_event(PEVNT_AUTH, peer, "Invalid_NAK"); peer->badNAK++; - msyslog(LOG_ERR, "crypto-NAK error at %ld %s<-%s", + msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s", current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr)); return; }