|
|
|
@ -69,13 +69,13 @@ func TestLinuxDNSMode(t *testing.T) {
|
|
|
|
|
want: "direct",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "resolved_not_running",
|
|
|
|
|
name: "resolved_alone_without_ping",
|
|
|
|
|
env: env(resolvDotConf("# Managed by systemd-resolved", "nameserver 127.0.0.53")),
|
|
|
|
|
wantLog: "dns: [rc=resolved resolved=no ret=direct]",
|
|
|
|
|
want: "direct",
|
|
|
|
|
wantLog: "dns: [rc=resolved nm=no ret=systemd-resolved]",
|
|
|
|
|
want: "systemd-resolved",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: "resolved_alone",
|
|
|
|
|
name: "resolved_alone_with_ping",
|
|
|
|
|
env: env(
|
|
|
|
|
resolvDotConf("# Managed by systemd-resolved", "nameserver 127.0.0.53"),
|
|
|
|
|
resolvedRunning()),
|
|
|
|
@ -162,17 +162,17 @@ func TestLinuxDNSMode(t *testing.T) {
|
|
|
|
|
{
|
|
|
|
|
// More than one user has had resolvconf write a config that points to
|
|
|
|
|
// systemd-resolved. We're better off using systemd-resolved.
|
|
|
|
|
// ...but what if systemd-resolved isn't running?
|
|
|
|
|
// and assuming that even if the ping doesn't show that env is correct
|
|
|
|
|
// regression test for https://github.com/tailscale/tailscale/issues/3026
|
|
|
|
|
name: "allegedly_resolvconf_but_actually_systemd-resolved_but_not_really",
|
|
|
|
|
name: "allegedly_resolvconf_but_actually_systemd-resolved_but_no_ping",
|
|
|
|
|
env: env(resolvDotConf(
|
|
|
|
|
"# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)",
|
|
|
|
|
"# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN",
|
|
|
|
|
"# 127.0.0.53 is the systemd-resolved stub resolver.",
|
|
|
|
|
"# run \"systemd-resolve --status\" to see details about the actual nameservers.",
|
|
|
|
|
"nameserver 127.0.0.53")),
|
|
|
|
|
wantLog: "dns: [rc=resolved resolved=no ret=direct]",
|
|
|
|
|
want: "direct",
|
|
|
|
|
wantLog: "dns: [rc=resolved nm=no ret=systemd-resolved]",
|
|
|
|
|
want: "systemd-resolved",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// regression test for https://github.com/tailscale/tailscale/issues/3304
|
|
|
|
@ -188,14 +188,14 @@ func TestLinuxDNSMode(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// regression test for https://github.com/tailscale/tailscale/issues/3304
|
|
|
|
|
name: "networkmanager_but_pointing_at_systemd-resolved_but_no_resolved",
|
|
|
|
|
name: "networkmanager_but_pointing_at_systemd-resolved_but_no_resolved_ping",
|
|
|
|
|
env: env(resolvDotConf(
|
|
|
|
|
"# Generated by NetworkManager",
|
|
|
|
|
"nameserver 127.0.0.53",
|
|
|
|
|
"options edns0 trust-ad"),
|
|
|
|
|
nmRunning("1.32.12", true)),
|
|
|
|
|
wantLog: "dns: [rc=nm nm-resolved=yes resolved=no ret=direct]",
|
|
|
|
|
want: "direct",
|
|
|
|
|
wantLog: "dns: [rc=nm nm-resolved=yes nm-safe=no ret=systemd-resolved]",
|
|
|
|
|
want: "systemd-resolved",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
// regression test for https://github.com/tailscale/tailscale/issues/3304
|
|
|
|
|