]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: don't keep refresh requests in list of unresolved sources
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 14 Mar 2024 14:32:28 +0000 (15:32 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 14 Mar 2024 15:39:41 +0000 (16:39 +0100)
commit6e5513c80bc0e962e8c0bb4b9af9b4b79e194971
tree6e4f10672e683b85e3d176127db69dbe0ae74fe7
parent6d0143e9636abd46b40a81fddfcca4aa2e6a0eaa
ntp: don't keep refresh requests in list of unresolved sources

The refresh command adds requests to reresolve addresses of all sources.
If some sources didn't have an IP address resolved yet, the
corresponding requests were not removed after failed resolving. Repeated
refresh commands increased the number of requests and number of calls of
the system resolver, which might not be caching DNS responses.

Remove all refresh requests from the list after resolving attempt to fix
that.

Reported-by: t.barnewski@avm.de
Fixes: d7e3ad17ff7a ("ntp: create sources for unresolved addresses")
ntp_sources.c