mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-31 21:42:24 +00:00
ipn/ipnlocal: fix data race with capForcedNetfilter field
Updates #cleanup Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I1fdad454198d7ea4a898dbff3062818b0db35167
This commit is contained in:
parent
2716250ee8
commit
cae6edf485
@ -4011,10 +4011,13 @@ func (b *LocalBackend) routerConfig(cfg *wgcfg.Config, prefs ipn.PrefsView, oneC
|
|||||||
singleRouteThreshold = 1
|
singleRouteThreshold = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
netfilterKind := b.capForcedNetfilter
|
b.mu.Lock()
|
||||||
|
netfilterKind := b.capForcedNetfilter // protected by b.mu
|
||||||
|
b.mu.Unlock()
|
||||||
|
|
||||||
if prefs.NetfilterKind() != "" {
|
if prefs.NetfilterKind() != "" {
|
||||||
if b.capForcedNetfilter != "" {
|
if netfilterKind != "" {
|
||||||
b.logf("nodeattr netfilter preference %s overridden by c2n pref %s", b.capForcedNetfilter, prefs.NetfilterKind())
|
b.logf("nodeattr netfilter preference %s overridden by c2n pref %s", netfilterKind, prefs.NetfilterKind())
|
||||||
}
|
}
|
||||||
netfilterKind = prefs.NetfilterKind()
|
netfilterKind = prefs.NetfilterKind()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user