David Anderson
3c508a58cc
wgengine/filter: don't filter GCP DNS.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
a38e28da07
net/packet: documentation pass.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
c2cc3acbaf
net/packet: remove NewIP, offer only a netaddr constructor.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
22bf48f37c
net/packet: remove {get,put}{16,32} indirection to encoding/binary.
...
name old time/op new time/op delta
Decode/tcp4-8 28.8ns ± 2% 13.1ns ± 4% -54.44% (p=0.008 n=5+5)
Decode/tcp6-8 20.6ns ± 1% 12.6ns ± 2% -38.72% (p=0.008 n=5+5)
Decode/udp4-8 28.2ns ± 1% 12.1ns ± 4% -57.01% (p=0.008 n=5+5)
Decode/udp6-8 20.0ns ± 6% 12.1ns ± 2% -39.38% (p=0.008 n=5+5)
Decode/icmp4-8 21.7ns ± 2% 11.5ns ± 1% -47.01% (p=0.008 n=5+5)
Decode/icmp6-8 14.1ns ± 2% 11.8ns ± 4% -16.60% (p=0.008 n=5+5)
Decode/unknown-8 9.43ns ± 2% 9.30ns ± 3% ~ (p=0.222 n=5+5)
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
55b1221db2
net/packet: support full IPv6 decoding.
...
The packet filter still rejects all IPv6, but decodes enough from v6
packets to do something smarter in a followup.
name time/op
Decode/tcp4-8 28.8ns ± 2%
Decode/tcp6-8 20.6ns ± 1%
Decode/udp4-8 28.2ns ± 1%
Decode/udp6-8 20.0ns ± 6%
Decode/icmp4-8 21.7ns ± 2%
Decode/icmp6-8 14.1ns ± 2%
Decode/unknown-8 9.43ns ± 2%
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
427bf2134f
net/packet: rename from wgengine/packet.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
David Anderson
19df6a2ee2
wgengine/packet: rename types to reflect their v4-only-ness, document.
...
Signed-off-by: David Anderson <danderson@tailscale.com>
6 years ago
Brad Fitzpatrick
73cc2d8f89
wgengine/filter: also silently drop link-local unicast traffic
...
Updates #629
6 years ago
Brad Fitzpatrick
5f807c389e
wgengine/filter: drop multicast packets out, don't log about them
...
Eventually we'll probably support multicast. For now it's just log spam.
Fixes #629
6 years ago
Brad Fitzpatrick
d96d26c22a
wgengine/filter: don't spam logs on dropped outgoing IPv6 ICMP or IPv4 IGMP
...
The OS (tries) to send these but we drop them. No need to worry the
user with spam that we're dropping it.
Fixes #402
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
3e3c24b8f6
wgengine/packet: add IPVersion field, don't use IPProto to note version
...
As prep for IPv6 log spam fixes in a future change.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Dmytro Shynkevych
67ebba90e1
tsdns: dual resolution mode, IPv6 support ( #526 )
...
This change adds to tsdns the ability to delegate lookups to upstream nameservers.
This is crucial for setting Magic DNS as the system resolver.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago
Dmytro Shynkevych
059b1d10bb
wgengine/packet: refactor and expose UDP header marshaling ( #408 )
...
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
6 years ago