[Git][NTPsec/ntpsec][master] 5 commits: Fix tag on msyslog message.

Hal Murray gitlab at mg.gitlab.com
Sat Dec 30 03:12:57 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
5664544a by Hal Murray at 2017-12-29T15:43:09-08:00
Fix tag on msyslog message.

- - - - -
a96d986f by Hal Murray at 2017-12-29T15:43:09-08:00
Fixup few msyslog tags: PROTO => DNS

- - - - -
c361003c by Hal Murray at 2017-12-29T15:43:09-08:00
Fix msyslog tag: MODE6 => PROTO

 * Code lives here because in past times it reported through the
 * obsolete trap facility.
report_event(

report_event is called for internal state changes.
It has nothing to do with mode 6 packets.

- - - - -
d8cc80f8 by Hal Murray at 2017-12-29T15:43:09-08:00
Another MODE6 -> PROTO

- - - - -
016ecb74 by Hal Murray at 2017-12-29T16:03:09-08:00
Fix msyslog tags: several PROTO => INIT

- - - - -


3 changed files:

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


Changes:

=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -4142,7 +4142,7 @@ report_event(
 			    " %s", str);
 		}
 		NLOG(NLOG_SYSEVENT)
-			msyslog(LOG_INFO, "MODE6: %s", statstr);
+			msyslog(LOG_INFO, "PROTO: %s", statstr);
 	} else {
 
 		/*
@@ -4176,7 +4176,7 @@ report_event(
 			    " %s", str);
 		}
 		NLOG(NLOG_PEEREVENT)
-			msyslog(LOG_INFO, "MODE6: %s", statstr);
+			msyslog(LOG_INFO, "PROTO: %s", statstr);
 	}
 	record_proto_stats(statstr);
 	DPRINT(1, ("event at %u %s\n", current_time, statstr));


=====================================
ntpd/ntp_peer.c
=====================================
--- a/ntpd/ntp_peer.c
+++ b/ntpd/ntp_peer.c
@@ -538,7 +538,7 @@ set_peerdstadr(
 		p->dstadr->peercnt--;
 		UNLINK_SLIST(unlinked, p->dstadr->peers, p, ilink,
 			     struct peer);
-		msyslog(LOG_INFO, "REFCLOCK: %s unlink local addr %s -> %s",
+		msyslog(LOG_INFO, "MODE6: %s unlink local addr %s -> %s",
 			socktoa(&p->srcadr), latoa(p->dstadr),
 			latoa(dstadr));
 	}


=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -2440,11 +2440,11 @@ dns_take_server(
 	pp = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT);
 	if (NULL != pp) {
 		/* Already in use. */
-		msyslog(LOG_INFO, "PROTO: Server skipping: %s", socktoa(rmtadr));
+		msyslog(LOG_INFO, "DNS: Server skipping: %s", socktoa(rmtadr));
 		return;
 	}
 
-	msyslog(LOG_INFO, "PROTO: Server taking: %s", socktoa(rmtadr));
+	msyslog(LOG_INFO, "DNS: Server taking: %s", socktoa(rmtadr));
 	server->cfg.flags &= (unsigned)~FLAG_DNS;
 		
 	server->srcadr = *rmtadr;
@@ -2452,7 +2452,7 @@ dns_take_server(
 
 	restrict_mask = restrictions(&server->srcadr);
 	if (RES_FLAGS & restrict_mask) {
-		msyslog(LOG_INFO, "PROTO: Server poking hole in restrictions for: %s",
+		msyslog(LOG_INFO, "DNS: Server poking hole in restrictions for: %s",
 			socktoa(&server->srcadr));
 		restrict_source(&server->srcadr, false, 0);
 	}
@@ -2484,11 +2484,11 @@ dns_take_pool(
 	peer = findexistingpeer(rmtadr, NULL, NULL, MODE_CLIENT);
 	if (NULL != peer) {
 		/* This address is already in use. */
-		msyslog(LOG_INFO, "PROTO: Pool skipping: %s", socktoa(rmtadr));
+		msyslog(LOG_INFO, "DNS: Pool skipping: %s", socktoa(rmtadr));
 		return;
 	}
 
-	msyslog(LOG_INFO, "PROTO: Pool taking: %s", socktoa(rmtadr));
+	msyslog(LOG_INFO, "DNS: Pool taking: %s", socktoa(rmtadr));
 
 	lcladr = findinterface(rmtadr);
 	memset(&pctl, '\0', sizeof(struct peer_ctl));
@@ -2508,7 +2508,7 @@ dns_take_pool(
 	restrict_mask = restrictions(&peer->srcadr);
 	/* FIXME-DNS: RES_FLAGS includes RES_DONTSERVE?? */
 	if (RES_FLAGS & restrict_mask) {
-		msyslog(LOG_INFO, "PROTO: Pool poking hole in restrictions for: %s",
+		msyslog(LOG_INFO, "DNS: Pool poking hole in restrictions for: %s",
 				socktoa(&peer->srcadr));
 		restrict_source(&peer->srcadr, false,
 				current_time + POOL_SOLICIT_WINDOW + 1);
@@ -2558,7 +2558,7 @@ void dns_take_status(struct peer* peer, DNS_Status status) {
 	if ((DNS_good == status) &&
 		(MDF_UCAST & peer->cast_flags) && !(FLAG_DNS & peer->cfg.flags))
 		hpoll = 0;  /* server: no more */
-	msyslog(LOG_INFO, "PROTO: dns_take_status: %s=>%s, %d",
+	msyslog(LOG_INFO, "DNS: dns_take_status: %s=>%s, %d",
 		peer->hostname, txt, hpoll);
 	if (0 == hpoll)
 		return; /* hpoll already in use by new server */
@@ -2696,10 +2696,10 @@ measure_precision(const bool verbose)
 	measured_tick = measure_tick_fuzz();
 	set_sys_tick_precision(measured_tick);
 	if (verbose) {
-		msyslog(LOG_INFO, "PROTO: precision = %.3f usec (%d)",
+		msyslog(LOG_INFO, "INIT: precision = %.3f usec (%d)",
 			sys_tick * US_PER_S, sys_precision);
 		if (sys_fuzz < sys_tick) {
-			msyslog(LOG_NOTICE, "PROTO: fuzz beneath %.3f usec",
+			msyslog(LOG_NOTICE, "INIT: fuzz beneath %.3f usec",
 				sys_fuzz * US_PER_S);
 		}
 	}
@@ -2772,18 +2772,18 @@ set_sys_tick_precision(
 
 	if (tick > 1.) {
 		msyslog(LOG_ERR,
-			"PROTO: unsupported tick %.3f > 1s ignored", tick);
+			"INIT: unsupported tick %.3f > 1s ignored", tick);
 		return;
 	}
 	if (tick < measured_tick) {
 		msyslog(LOG_ERR,
-			"PROTO: tick %.3f less than measured tick %.3f, ignored",
+			"INIT: tick %.3f less than measured tick %.3f, ignored",
 			tick, measured_tick);
 		return;
 	} else if (tick > measured_tick) {
 		trunc_os_clock = true;
 		msyslog(LOG_NOTICE,
-			"PROTO: truncating system clock to multiples of %.9f",
+			"INIT: truncating system clock to multiples of %.9f",
 			tick);
 	}
 	sys_tick = tick;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/9e436ebf99d992ab9996366c7eda5bd68b3925e7...016ecb74408a95c4f06c03c079ac4b3fdd952dfe

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/9e436ebf99d992ab9996366c7eda5bd68b3925e7...016ecb74408a95c4f06c03c079ac4b3fdd952dfe
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/20171230/3e0b31eb/attachment.html>


More information about the vc mailing list