all: use atomic.Pointer

Also add some missing docs.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali
2022-08-03 21:31:40 -07:00
committed by Maisem Ali
parent 5381437664
commit 9bb5a038e5
9 changed files with 21 additions and 24 deletions

View File

@@ -973,8 +973,8 @@ func (h *peerAPIHandler) replyToDNSQueries() bool {
// ourselves. As a proxy for autogroup:internet access, we see
// if we would've accepted a packet to 0.0.0.0:53. We treat
// the IP 0.0.0.0 as being "the internet".
f, ok := b.filterAtomic.Load().(*filter.Filter)
if !ok {
f := b.filterAtomic.Load()
if f == nil {
return false
}
// Note: we check TCP here because the Filter type already had