From 8e1d46e54ffd3d3d7fa7836e9b41baa986cc9070 Mon Sep 17 00:00:00 2001 From: Irbe Krumina Date: Fri, 7 Jun 2024 15:35:43 +0100 Subject: [PATCH] net/dns: check if Manager.knobs isn't nil before using it Updates corp#15802 Signed-off-by: Irbe Krumina --- net/dns/manager.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/dns/manager.go b/net/dns/manager.go index 61c6dfecc..0a7612f25 100644 --- a/net/dns/manager.go +++ b/net/dns/manager.go @@ -296,6 +296,9 @@ func (m *Manager) compileConfig(cfg Config) (rcfg resolver.Config, ocfg OSConfig } func (m *Manager) disableSplitDNSOptimization() bool { + if m.knobs == nil { + return false + } return m.knobs.DisableSplitDNSWhenNoCustomResolvers.Load() }