From a475c435ecdcce0291e50547d6160c48c43ce304 Mon Sep 17 00:00:00 2001 From: Andrew Dunham Date: Tue, 25 Jun 2024 22:58:45 -0400 Subject: [PATCH] net/dns/resolver: fix test failure Updates #cleanup Signed-off-by: Andrew Dunham Change-Id: I0e815a69ee44ca0ff7c0ea0ca3c6904bbf67ed1f --- net/dns/resolver/forwarder.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/dns/resolver/forwarder.go b/net/dns/resolver/forwarder.go index ecc3ce5ea..8676aebc7 100644 --- a/net/dns/resolver/forwarder.go +++ b/net/dns/resolver/forwarder.go @@ -889,7 +889,9 @@ func (f *forwarder) forwardWithDestChan(ctx context.Context, query packet, respo // Attempt to recompile the DNS configuration // If we are being asked to forward queries and we have no // nameservers, the network is in a bad state. - f.missingUpstreamRecovery() + if f.missingUpstreamRecovery != nil { + f.missingUpstreamRecovery() + } res, err := servfailResponse(query) if err != nil {