aboutsummaryrefslogtreecommitdiffstats
path: root/device/allowedips_rand_test.go (unfollow)
Commit message (Collapse)AuthorFilesLines
9 daysglobal: use netip where possible nowJason A. Donenfeld1-2/+4
There are more places where we'll need to add it later, when Go 1.18 comes out with support for it in the "net" package. Also, allowedips still uses slices internally, which might be suboptimal. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03device: limit allowedip fuzzer a to 4 times throughJason A. Donenfeld1-5/+10
Trying this for every peer winds up being very slow and precludes it from acceptable runtime in the CI, so reduce this to 4. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03device: simplify allowedips lookup signatureJason A. Donenfeld1-2/+2
The inliner should handle this for us. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03device: remove nodes by peer in O(1) instead of O(n)Jason A. Donenfeld1-46/+50
Now that we have parent pointers hooked up, we can simply go right to the node and remove it in place, rather than having to recursively walk the entire trie. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03device: remove recursion from insertion and connect parent pointersJason A. Donenfeld1-6/+6
This makes the insertion algorithm a bit more efficient, while also now taking on the additional task of connecting up parent pointers. This will be handy in the following commit. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-06-03device: reduce size of trie structJason A. Donenfeld1-4/+4
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-01-28global: bump copyrightJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-01-07all: use ++ to incrementJosh Bleecher Snyder1-6/+6
Make the code slightly more idiomatic. No functional changes. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2020-05-02global: update header comments and modulesJason A. Donenfeld1-1/+1
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-03-03global: begin modularizationJason A. Donenfeld1-1/+1
2019-02-05Update copyrightJason A. Donenfeld1-2/+2
2018-09-16global: fix up copyright headersJason A. Donenfeld1-2/+1
2018-05-19Add copyright headersMathias Hall-Andersen1-0/+1
2018-05-15Fix refactoring mistakesJason A. Donenfeld1-2/+2
2018-05-13Odds and endsJason A. Donenfeld1-8/+8
2018-05-03global: Add SPDX tags and copyright headerJason A. Donenfeld1-0/+5
Mathias should probably add his copyright headers to each file too.
2018-02-04Align with go library layoutMathias Hall-Andersen1-0/+0
2017-06-02Trie random testMathias Hall-Andersen1-4/+10
Test trie against naive implementation of prefix routing.
2017-06-02Added random test for trieMathias Hall-Andersen1-0/+120