[Git][NTPsec/ntpsec][master] Move ntp_monitor() call to where it catches Mode 6 packets.

Eric S. Raymond gitlab at mg.gitlab.com
Fri Dec 16 11:43:22 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
46daf761 by Eric S. Raymond at 2016-12-16T06:43:13-05:00
Move ntp_monitor() call to where it catches Mode 6 packets.

- - - - -


1 changed file:

- ntpd/ntp_proto.c


Changes:

=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -739,6 +739,12 @@ receive(
 		goto done;
 	}
 
+	restrict_mask = ntp_monitor(rbufp, restrict_mask);
+	if (restrict_mask & RES_LIMITED) {
+		sys_limitrejected++;
+		if(!(restrict_mask & RES_KOD)) { goto done; }
+	}
+
 	if(is_control_packet(rbufp)) {
 		process_control(rbufp, restrict_mask);
 		goto done;
@@ -783,12 +789,6 @@ receive(
 		}
 	}
 
-	restrict_mask = ntp_monitor(rbufp, restrict_mask);
-	if (restrict_mask & RES_LIMITED) {
-		sys_limitrejected++;
-		if(!(restrict_mask & RES_KOD)) { goto done; }
-	}
-
 	switch(match) {
 	    case AM_FXMIT:
             case AM_NEWPASS:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/46daf761317f0e424c0f1c7cd07ae06209ac21ea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161216/32321fe2/attachment.html>


More information about the vc mailing list