7d84ee6c98
net/dns: unify the OS manager and internal resolver.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-05 10:55:35 -07:00
1bf91c8123
net/dns/resolver: remove unused err return value.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-05 10:55:35 -07:00
6a206fd0fb
net/dns: rename impl to os.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-05 10:55:35 -07:00
c4530971db
net/dns/resolver: remove leftover debug print.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-05 10:55:35 -07:00
4c61ebacf4
wgengine: move DNS configuration out of wgengine/router.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-05 10:55:35 -07:00
748670f1e9
net/dns: fix typo in docstring.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 18:44:02 -07:00
a39d2403bc
net/dns: disable NetworkManager and resolved configurators temporarily.
...
They need some rework to do the right thing, in the meantime the direct
and resolvconf managers will work out.
The resolved implementation was never selected due to control-side settings.
The networkmanager implementation mostly doesn't get selected due to
unforeseen interactions with `resolvconf` on many platforms.
Both implementations also need rework to support the various routing modes
they're capable of.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 02:41:33 -07:00
befd8e4e68
net/dns: replace managerImpl with OSConfigurator in code.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 02:34:40 -07:00
077d4dc8c7
net/dns: add an OSConfigurator interface.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 01:49:17 -07:00
6ad44f9fdf
wgengine: take in dns.Config, split out to resolver.Config and dns.OSConfig.
...
Stepping stone towards having the DNS package handle the config splitting.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 00:59:44 -07:00
2edb57dbf1
net/dns: add new Config that captures tailscale+OS DNS config.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 00:59:44 -07:00
8af9d770cf
net/dns: rename Config to OSConfig.
...
Making way for a new higher level config struct.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-02 00:59:44 -07:00
fcfc0d3a08
net/dns: remove ManagerConfig, pass relevant args directly.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 23:26:52 -07:00
0ca04f1e01
net/dns: put noop.go back, limit with build tags for staticcheck.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 23:14:13 -07:00
95470c3448
net/dns: remove Cleanup manager parameter.
...
It's only use to skip some optional initialization during cleanup,
but that work is very minor anyway, and about to change drastically.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 23:06:56 -07:00
cf361bb9b1
net/dns: remove PerDomain from Config.
...
It's currently unused, and no longer makes sense with the upcoming
DNS infrastructure. Keep it in tailcfg for now, since we need protocol
compat for a bit longer.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 22:55:44 -07:00
f77ba75d6c
wgengine/router: move DNS cleanup into the DNS package.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 22:35:34 -07:00
9f105d3968
net/dns/resolver: teach the forwarder to do per-domain routing.
...
Given a DNS route map, the forwarder selects the right set of
upstreams for a given name.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 19:42:48 -07:00
90f82b6946
net/dns/resolver: add live reconfig, plumb through to ipnlocal.
...
The resolver still only supports a single upstream config, and
ipn/wgengine still have to split up the DNS config, but this moves
closer to unifying the DNS configs.
As a handy side-effect of the refactor, IPv6 MagicDNS records exist
now.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-04-01 01:44:03 -07:00
caeafc4a32
net/dns/resolver: fix package docstring.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:42:28 -07:00
dbe4f6f42d
net/dns/resolver: unexport Resolve and ResolveReverse.
...
They're only used internally and in tests, and have surprising
semantics in that they only resolve MagicDNS names, not upstream
resolver queries.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:35:26 -07:00
cdeb8d6816
net/dns/resolver: fix staticcheck error.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:19:09 -07:00
f185d62dc8
net/dns/resolver: unexport Packet, only use it internally.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:12:31 -07:00
5fb9e00ecf
net/dns/resolver: remove Start method, fully spin up in New instead.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:12:31 -07:00
075fb93e69
net/dns/resolver: remove the Config struct.
...
In preparation for reintroducing a runtime reconfig Config struct.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:12:31 -07:00
bc81dd4690
net/dns/resolver: rename ResolverConfig to just Config.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:12:31 -07:00
d99f5b1596
net/dns/resolver: factor the resolver out into a sub-package.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-31 23:12:30 -07:00
6521f02ff6
Move DNS flush logic to net/dns.
...
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-25 17:40:52 -07:00
9f7f2af008
wgengine/router/dns: move to net/dns.
...
Preparation for merging the APIs and whatnot.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-25 16:25:30 -07:00
8432999835
Move wgengine/tsdns to net/dns.
...
Straight move+fixup, no other changes. In prep for merging with
wgengine/router/dns.
Signed-off-by: David Anderson <danderson@tailscale.com >
2021-03-25 16:25:30 -07:00