mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
net/ipset: skip the loop over Prefixes when there's only one
For pprof cosmetic/confusion reasons more than performance, but it might have tiny speed benefit. Updates #12486 Change-Id: I40e03714f3afa3a7e7f5e1fa99b81c7e889b91b6 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
20a5f939ba
commit
1f6645b19f
@@ -41,7 +41,7 @@ var newContainsIPFuncTests = []struct {
|
||||
{
|
||||
name: "cidr-list-1",
|
||||
pfx: pp("10.0.0.0/8"),
|
||||
want: "linear-contains",
|
||||
want: "one-prefix",
|
||||
wantIn: aa("10.0.0.1", "10.2.3.4"),
|
||||
wantOut: aa("8.8.8.8"),
|
||||
},
|
||||
|
Reference in New Issue
Block a user