go.mod: update netaddr

Involves minor IPSetBuilder.Set API change.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-06-02 09:04:37 -07:00
parent 9794be375d
commit a321c24667
6 changed files with 17 additions and 9 deletions

View File

@@ -130,7 +130,8 @@ func NewAllowAllForTest(logf logger.Logf) *Filter {
var sb netaddr.IPSetBuilder
sb.AddPrefix(any4)
sb.AddPrefix(any6)
return New(ms, sb.IPSet(), sb.IPSet(), nil, logf)
ipSet, _ := sb.IPSet()
return New(ms, ipSet, ipSet, nil, logf)
}
// NewAllowNone returns a packet filter that rejects everything.

View File

@@ -54,7 +54,10 @@ func newFilter(logf logger.Logf) *Filter {
var logB netaddr.IPSetBuilder
logB.Complement()
return New(matches, localNets.IPSet(), logB.IPSet(), nil, logf)
localNetsSet, _ := localNets.IPSet()
logBSet, _ := logB.IPSet()
return New(matches, localNetsSet, logBSet, nil, logf)
}
func TestFilter(t *testing.T) {
@@ -424,7 +427,7 @@ func TestLoggingPrivacy(t *testing.T) {
logB.AddPrefix(netaddr.MustParseIPPrefix("100.64.0.0/10"))
logB.AddPrefix(tsaddr.TailscaleULARange())
f := newFilter(logf)
f.logIPs = logB.IPSet()
f.logIPs, _ = logB.IPSet()
var (
ts4 = netaddr.IPPortFrom(tsaddr.CGNATRange().IP().Next(), 1234)