resolve: Adjust and unify D-Bus call timeout (#7847)
authorott <ott@users.noreply.github.com>
Tue, 23 Jan 2018 00:53:31 +0000 (01:53 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 23 Jan 2018 00:53:31 +0000 (09:53 +0900)
commit4cbfd62b46e3fb93309a43741d90e52c9cbb2451
tree1d5e04aefe91307bac55df8e7a85e4fe67f7f652
parent47628ee121376ec07c50f864dd75aae86f119a45
resolve: Adjust and unify D-Bus call timeout (#7847)

DNS queries have a timeout of DNS_TRANSACTION_ATTEMPTS_MAX *
DNS_TIMEOUT_MAX_USEC = 120 s. Calls to the ResolveHostname method of
the org.freedesktop.resolve1.Manager interface have various call
timeouts that are smaller than 120 s. So it seems correct to adjust
the call timeout to the maximum query timeout and to unify the call
timeout among all callers.

A timeout of 120 s might seem large, in particular since BIND does seem
to have a query timeout of 10 s. However, it seems match the timeout
value of 120 s of Unbound. Moreover, the query and timeout handling of
resolve have problems and might be improved in the future, so this
change is at best an interim solution.
src/nss-resolve/nss-resolve.c
src/resolve/resolve-tool.c
src/resolve/resolved-def.h
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-server.c
src/resolve/test-dnssec-complex.c