Josh Bleecher Snyder
20e04418ff
net/dns: add GOOS build tags
...
Fixes #1786
Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
5 years ago
David Anderson
53213114ec
net/dns: make debian_resolvconf correctly clear DNS configs.
...
More of #1720 .
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
3b1ab78954
net/dns: restore resolv.conf when given an empty config in directManager.
...
Fixes #1720 .
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
1f9b73a531
net/dns: fix freebsd DNS manager selection.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
854d5d36a1
net/dns: return error from NewOSManager, use it to initialize NM.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
61b361bac0
net/dns: teach the openresolv manager to read DNS config.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
5480189313
net/dns: implement a DNS override workaround for legacy resolvconf.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
1a371b93be
util/dnsname: add FQDN type, use throughout codebase.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
e638a4d86b
net/dns: make directManager support split DNS, and work in sandboxes.
...
Fixes #1495 , #683 .
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
4a64d2a603
net/dns: some post-review cleanups.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
68f76e9aa1
net/dns: add GetBaseConfig to OSConfigurator interface.
...
Part of #953 , required to make split DNS work on more basic
platforms.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
e0e677a8f6
net/dns: split out search domains and match domains in OSConfig.
...
It seems that all the setups that support split DNS understand
this distinction, and it's an important one when translating
high-level configuration.
Part of #953 .
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
de6dc4c510
net/dns: add a Primary field to OSConfig.
...
Currently ignored.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
b2a597b288
net/dns: rename Set to SetDNS in OSConfigurator.
...
wgengine/router.CallbackRouter needs to support both the Router
and OSConfigurator interfaces, so the setters can't both be called
Set.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
befd8e4e68
net/dns: replace managerImpl with OSConfigurator in code.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
8af9d770cf
net/dns: rename Config to OSConfig.
...
Making way for a new higher level config struct.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
fcfc0d3a08
net/dns: remove ManagerConfig, pass relevant args directly.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
9f7f2af008
wgengine/router/dns: move to net/dns.
...
Preparation for merging the APIs and whatnot.
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
Brad Fitzpatrick
01ee638cca
Change some os.IsNotExist to errors.Is(err, os.ErrNotExist) for non-os errors.
...
os.IsNotExist doesn't unwrap errors. errors.Is does.
The ioutil.ReadFile ones happened to be fine but I changed them so
we're consistent with the rule: if the error comes from os, you can
use os.IsNotExist, but from any other package, use errors.Is.
(errors.Is always would also work, but not worth updating all the code)
The motivation here was that we were logging about failure to migrate
legacy relay node prefs file on startup, even though the code tried
to avoid that.
See golang/go#41122
6 years ago
Dmytro Shynkevych
28e52a0492
all: dns refactor, add Proxied and PerDomain flags from control ( #615 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
154d1cde05
router: reload systemd-resolved after changing /etc/resolv.conf ( #619 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
30bbbe9467
wgengine/router: dns: unify on *BSD, multimode on Linux, Magic DNS ( #536 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago