[Git][NTPsec/ntpsec][master] Make auth column from ntpq assoc work for NTS.

Hal Murray gitlab at mg.gitlab.com
Mon Jul 15 03:00:56 UTC 2019



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
8e3daaf0 by Hal Murray at 2019-07-13T23:37:06Z
Make auth column from ntpq assoc work for NTS.

- - - - -


2 changed files:

- ntpd/ntp_control.c
- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_control.c
=====================================
@@ -874,7 +874,7 @@ ctlpeerstatus(
 	status = p->status;
 	if (FLAG_CONFIG & p->cfg.flags)
 		status |= CTL_PST_CONFIG;
-	if (p->cfg.peerkey)
+	if ((p->cfg.peerkey) || (FLAG_NTS & p->cfg.flags))
 		status |= CTL_PST_AUTHENABLE;
 	if (FLAG_AUTHENTIC & p->cfg.flags)
 		status |= CTL_PST_AUTHENTIC;


=====================================
ntpd/ntp_proto.c
=====================================
@@ -691,12 +691,6 @@ receive(
 		}
 	}
 
-	if (peer != NULL) {
-	    	peer->received++;
-		peer->cfg.flags |= FLAG_AUTHENTIC;
-		peer->timereceived = current_time;
-	}
-
 	switch (PKT_MODE(rbufp->pkt.li_vn_mode)) {
 	    case MODE_ACTIVE:  /* remote site using "peer" in config file */
 	    case MODE_CLIENT:  /* Request for us as a server. */
@@ -722,6 +716,9 @@ receive(
 		    maybe_log_junk(rbufp);
 		    break;
 		}
+		peer->received++;
+		peer->cfg.flags |= FLAG_AUTHENTIC;
+		peer->timereceived = current_time;
 		handle_procpkt(rbufp, peer);
 		stat_count.sys_processed++;
 		peer->processed++;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/8e3daaf0b19a2c223553f8c46c27287147d983fa

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/8e3daaf0b19a2c223553f8c46c27287147d983fa
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190715/b1d0dd7a/attachment-0001.htm>


More information about the vc mailing list