Emmanuel T Odeke
0daa32943e
all: add (*testing.B).ReportAllocs() to every benchmark
...
This ensures that we can properly track and catch allocation
slippages that could otherwise have been missed.
Fixes #2748
2021-08-30 21:41:04 -07:00
Matt Layher
3ff8a55fa7
net/tsaddr: remove IsULA, replace with netaddr.IP.IsPrivate
...
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-30 19:56:11 -07:00
Brad Fitzpatrick
ca455ac84b
net/tsaddr: simplify TailscaleServiceIP
...
netaddr allocated at the time this was written. No longer.
name old time/op new time/op delta
TailscaleServiceAddr-4 5.46ns ± 4% 1.83ns ± 3% -66.52% (p=0.008 n=5+5)
A bunch of the others can probably be simplified too, but this
was the only one with just an IP and not an IPPrefix.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-05-28 20:36:26 -07:00
Brad Fitzpatrick
7629cd6120
net/tsaddr: add NewContainsIPFunc (move from wgengine)
...
I want to use this from netstack but it's not exported.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-05-05 13:15:50 -07:00
Denton Gentry
ecf310be3c
net/tsaddr: IsUla() for IPv6 Unique Local Address
...
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-03-30 12:33:53 -07:00
Josh Bleecher Snyder
1e88050403
net/tsaddr: add ChromeOS contains tests
...
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-12-28 16:48:43 -08:00
Brad Fitzpatrick
742b8b44a8
net/tsaddr: new package to hold Tailscale-specific IPs/ranges
...
And update existing callers with (near) duplicated cases.
2020-07-06 22:33:29 -07:00