Skip to content
Permalink
Browse files

busybox: ntpd: more verbose message for "root distance too high" case…

… (backport)

Original commit: 1303962957fb900ed97c5958403990e885b06e29
  • Loading branch information...
Denys Vlasenko authored and RMerl committed May 13, 2019
1 parent 2091dd6 commit 0faeab42861217a920c2f9e1034fc1a4e317c324
Showing with 8 additions and 3 deletions.
  1. +8 −3 release/src/router/busybox/networking/ntpd.c
@@ -1094,7 +1094,8 @@ fit(peer_t *p, double rd)
{
if ((p->reachable_bits & (p->reachable_bits-1)) == 0) {
/* One or zero bits in reachable_bits */
VERB4 bb_error_msg("peer %s unfit for selection: unreachable", p->p_dotted);
VERB4 bb_error_msg("peer %s unfit for selection: "
"unreachable", p->p_dotted);
return 0;
}
if (option_mask32 & OPT_t) /* RFC-4330 check disabled */
@@ -1104,13 +1105,17 @@ fit(peer_t *p, double rd)
if ((p->lastpkt_status & LI_ALARM) == LI_ALARM
|| p->lastpkt_stratum >= MAXSTRAT
) {
VERB4 bb_error_msg("peer %s unfit for selection: bad status/stratum", p->p_dotted);
VERB4 bb_error_msg("peer %s unfit for selection: "
"bad status/stratum", p->p_dotted);
return 0;
}
#endif
/* rd is root_distance(p) */
if (rd > MAXDIST + FREQ_TOLERANCE * (1 << G.poll_exp)) {
VERB4 bb_error_msg("peer %s unfit for selection: root distance too high", p->p_dotted);
VERB3 bb_error_msg("peer %s unfit for selection: "
"root distance %f too high, jitter:%f",
p->p_dotted, rd, p->filter_jitter
);
return 0;
}
//TODO

0 comments on commit 0faeab4

Please sign in to comment.
You can’t perform that action at this time.