aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-09-13 12:15:36 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-09-13 12:15:36 +0200
commit1303962957fb900ed97c5958403990e885b06e29 (patch)
tree236734ad76687b79aa00a5c6a4a670b35bf13030
parent05b18065ab9c375f6185b65a3631d4c6cc1a4be9 (diff)
downloadbusybox-w32-1303962957fb900ed97c5958403990e885b06e29.tar.gz
busybox-w32-1303962957fb900ed97c5958403990e885b06e29.tar.bz2
busybox-w32-1303962957fb900ed97c5958403990e885b06e29.zip
ntpd: more verbose message for "root distance too high" case
Managed to make ntpd on one of my machines to be stuck getting "root distance too high" all the time, but log is not giving me more informatin what exactly is happening... function old new delta select_and_cluster 1045 1095 +50 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/ntpd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 991c518f6..1ebdc34c3 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -1116,20 +1116,25 @@ fit(peer_t *p, double rd)
1116{ 1116{
1117 if ((p->reachable_bits & (p->reachable_bits-1)) == 0) { 1117 if ((p->reachable_bits & (p->reachable_bits-1)) == 0) {
1118 /* One or zero bits in reachable_bits */ 1118 /* One or zero bits in reachable_bits */
1119 VERB4 bb_error_msg("peer %s unfit for selection: unreachable", p->p_dotted); 1119 VERB4 bb_error_msg("peer %s unfit for selection: "
1120 "unreachable", p->p_dotted);
1120 return 0; 1121 return 0;
1121 } 1122 }
1122#if 0 /* we filter out such packets earlier */ 1123#if 0 /* we filter out such packets earlier */
1123 if ((p->lastpkt_status & LI_ALARM) == LI_ALARM 1124 if ((p->lastpkt_status & LI_ALARM) == LI_ALARM
1124 || p->lastpkt_stratum >= MAXSTRAT 1125 || p->lastpkt_stratum >= MAXSTRAT
1125 ) { 1126 ) {
1126 VERB4 bb_error_msg("peer %s unfit for selection: bad status/stratum", p->p_dotted); 1127 VERB4 bb_error_msg("peer %s unfit for selection: "
1128 "bad status/stratum", p->p_dotted);
1127 return 0; 1129 return 0;
1128 } 1130 }
1129#endif 1131#endif
1130 /* rd is root_distance(p) */ 1132 /* rd is root_distance(p) */
1131 if (rd > MAXDIST + FREQ_TOLERANCE * (1 << G.poll_exp)) { 1133 if (rd > MAXDIST + FREQ_TOLERANCE * (1 << G.poll_exp)) {
1132 VERB4 bb_error_msg("peer %s unfit for selection: root distance too high", p->p_dotted); 1134 VERB3 bb_error_msg("peer %s unfit for selection: "
1135 "root distance %f too high, jitter:%f",
1136 p->p_dotted, rd, p->filter_jitter
1137 );
1133 return 0; 1138 return 0;
1134 } 1139 }
1135//TODO 1140//TODO