Do not log connection info before the connection exists
If the resolver encounters an error before it attempts to forward the
request to external DNS, do not try to log information about the
external connection, because at this point `extConn` is `nil`. This
makes sure `dockerd` won't panic and crash from a nil pointer
dereference when it sees an invalid DNS query.
fixes #44979
Signed-off-by: er0k <er0k@er0k.net>
(cherry picked from commit 6c2637be1142b2ed537795d960952414ffc73a58)
Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com>