summaryrefslogtreecommitdiff
path: root/networking/ntpd.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-01-19 14:42:34 +0100
committerDenys Vlasenko2017-01-19 14:42:34 +0100
commit1bfc4b85a7915210936edc62ecf0d01a17751222 (patch)
tree5e5a4b4821f518a78b048caf6842203e2dec7118 /networking/ntpd.c
parent704c606f480ff9b274582fabb2c4006919f9542d (diff)
downloadbusybox-1bfc4b85a7915210936edc62ecf0d01a17751222.zip
busybox-1bfc4b85a7915210936edc62ecf0d01a17751222.tar.gz
ntpd: print result of hostname resolution
This is particularly useful if hostname resolution is triggered by host non-reachability: I saw this in real-life, without the message it is not at all obvious that IP that we use for a specific host has changed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ntpd.c')
-rw-r--r--networking/ntpd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/networking/ntpd.c b/networking/ntpd.c
index bfd5705..5cc71ca 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -757,7 +757,7 @@ reset_peer_stats(peer_t *p, double offset)
* and clear reachable bits, but this proved to be too agressive:
* after step (tested with suspending laptop for ~30 secs),
* this caused all previous data to be considered invalid,
- * making us needing to collect full ~8 datapoins per peer
+ * making us needing to collect full ~8 datapoints per peer
* after step in order to start trusting them.
* In turn, this was making poll interval decrease even after
* step was done. (Poll interval decreases already before step
@@ -800,6 +800,8 @@ resolve_peer_hostname(peer_t *p)
free(p->p_dotted);
p->p_lsa = lsa;
p->p_dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
+ VERB1 if (strcmp(p->p_hostname, p->p_dotted) != 0)
+ bb_error_msg("'%s' is %s", p->p_hostname, p->p_dotted);
} else {
/* error message is emitted by host2sockaddr() */
set_next(p, HOSTNAME_INTERVAL);