mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
go.mod: update netaddr
Involves minor IPSetBuilder.Set API change. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
@@ -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.
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user