David Anderson
d99f5b1596
net/dns/resolver: factor the resolver out into a sub-package.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
5 years ago
David Anderson
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>
5 years ago
Brad Fitzpatrick
f9f3b67f3a
wgengine{,tsdns}: rebind MagicDNS forwarders on link change
...
Fixes #1480
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Josh Bleecher Snyder
f0ef561049
wgengine/tsdns: use netns to obtain a socket
...
Fixes #789
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
6 years ago
Josh Bleecher Snyder
6e8328cba5
wgengine/tsdns: replace connections when net link changes (macOS)
...
When the network link changes, existing UDP sockets fail immediately
and permanently on macOS.
The forwarder set up a single UDP conn and never changed it.
As a result, any time there was a network link change,
all forwarded DNS queries failed.
To fix this, create a new connection when send requests
fail because of network unreachability.
This change is darwin-only, although extended it to other platforms
should be straightforward.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
6 years ago
Dmytro Shynkevych
aa1da24f18
tsdns: remove now unused fields.
...
Missed in 7541982635 .
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
7541982635
tsdns: remove forwarding queue.
...
Two levels of queueing are unnecessary.
The resulting implementation performs as follows
under request bursts (`count` packets sent concurrently):
lost count avg latency
0 / 256 (00.00%) - 28ms
0 / 512 (00.00%) - 146ms
0 / 768 (00.00%) - 166ms
0 / 1024 (00.00%) - 416ms
11 / 1280 (00.86%) - 430ms
145 / 1536 (09.44%) - 715ms
364 / 2048 (17.77%) - 836ms
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
1af70e2468
tsdns: delegate requests asynchronously ( #687 )
...
Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago