summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/sntp/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/sntp/main.c')
-rw-r--r--contrib/ntp/sntp/main.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/contrib/ntp/sntp/main.c b/contrib/ntp/sntp/main.c
index c271c8c..20e27f0 100644
--- a/contrib/ntp/sntp/main.c
+++ b/contrib/ntp/sntp/main.c
@@ -1161,6 +1161,7 @@ handle_pkt(
int stratum;
char * ref;
char * ts_str;
+ char * leaptxt;
double offset;
double precision;
double synch_distance;
@@ -1256,9 +1257,28 @@ handle_pkt(
disptxt[0] = '\0';
}
- msyslog(LOG_INFO, "%s %+.*f%s %s s%d%s", ts_str,
+ switch (PKT_LEAP(rpkt->li_vn_mode)) {
+ case LEAP_NOWARNING:
+ leaptxt = "no-leap";
+ break;
+ case LEAP_ADDSECOND:
+ leaptxt = "add-leap";
+ break;
+ case LEAP_DELSECOND:
+ leaptxt = "del-leap";
+ break;
+ case LEAP_NOTINSYNC:
+ leaptxt = "unsync";
+ break;
+ default:
+ leaptxt = "LEAP-ERROR";
+ break;
+ }
+
+ msyslog(LOG_INFO, "%s %+.*f%s %s s%d %s%s", ts_str,
digits, offset, disptxt,
hostnameaddr(hostname, host), stratum,
+ leaptxt,
(time_adjusted)
? " [excess]"
: "");
OpenPOWER on IntegriCloud