]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Allow Active and Passive peer for crypto-NAK and added reporting
authorDanny Mayer <mayer@ntp.org>
Tue, 9 Feb 2016 00:46:57 +0000 (00:46 +0000)
committerDanny Mayer <mayer@ntp.org>
Tue, 9 Feb 2016 00:46:57 +0000 (00:46 +0000)
bk: 56b93701Ha8cv0gyWqIg69A7EfN6QA

ntpd/ntp_proto.c

index 6d6658b314db589d7202808ab4f7e3d9c8459fe8..ec6acd95a4975ba746c8ed770d7d81d5a11d9f29 100644 (file)
@@ -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;
        }