diff --git a/client/firewall/uspfilter/localip.go b/client/firewall/uspfilter/localip.go index 9636e1cc9..48ffa44f3 100644 --- a/client/firewall/uspfilter/localip.go +++ b/client/firewall/uspfilter/localip.go @@ -52,7 +52,7 @@ func (m *localIPManager) processIP(ip net.IP, newIPv4Bitmap *[1 << 16]uint32, ip if _, exists := ipv4Set[ipStr]; !exists { ipv4Set[ipStr] = struct{}{} *ipv4Addresses = append(*ipv4Addresses, ipStr) - (*newIPv4Bitmap)[high] |= 1 << (low % 32) + newIPv4Bitmap[high] |= 1 << (low % 32) } } return nil diff --git a/client/firewall/uspfilter/localip_test.go b/client/firewall/uspfilter/localip_test.go index f179fb2e3..91c5d52c5 100644 --- a/client/firewall/uspfilter/localip_test.go +++ b/client/firewall/uspfilter/localip_test.go @@ -52,6 +52,7 @@ func BenchmarkIPChecks(b *testing.B) { ip := interfaces[4] b.ResetTimer() for i := 0; i < b.N; i++ { + // nolint:gosimple _, _ = mapManager.localIPs[ip.String()] } }) @@ -60,6 +61,7 @@ func BenchmarkIPChecks(b *testing.B) { ip := interfaces[12] b.ResetTimer() for i := 0; i < b.N; i++ { + // nolint:gosimple _, _ = mapManager.localIPs[ip.String()] } })