continues the cleanup of dns_client started in the previous commit. (cherry picked from commit 1beb05f3e2)
1beb05f3e2