diff --git a/net/dns/manager_linux_test.go b/net/dns/manager_linux_test.go index 1bbd97592..ed8c60e2b 100644 --- a/net/dns/manager_linux_test.go +++ b/net/dns/manager_linux_test.go @@ -220,6 +220,17 @@ func TestLinuxDNSMode(t *testing.T) { wantLog: "dns: [rc=nm nm-resolved=yes nm=no ret=systemd-resolved]", want: "systemd-resolved", }, + { + // regression test for https://github.com/tailscale/tailscale/issues/3531 + name: "networkmanager_but_systemd-resolved_with_search_domain", + env: env(resolvDotConf( + "# Generated by NetworkManager", + "search lan", + "nameserver 127.0.0.53"), + resolvedRunning()), + wantLog: "dns: [rc=nm nm-resolved=yes nm=no ret=systemd-resolved]", + want: "systemd-resolved", + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) {