summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/nic.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2020-01-27 10:09:51 -0800
committerKevin Krakauer <krakauer@google.com>2020-01-27 10:09:51 -0800
commit67243ca51c4bb98a00509b2ea930e03993c5b285 (patch)
tree8fb79232b696756fe178a1de49a7a806a453ed97 /pkg/tcpip/stack/nic.go
parent2946fe81627afa223853769ed736e2a56e0144b7 (diff)
parent6b43cf791a74a746443f70f98d859c1246f87e2a (diff)
Merge branch 'master' into ipt-udp-matchers
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r--pkg/tcpip/stack/nic.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go
index 79556a36f..7dad9a8cb 100644
--- a/pkg/tcpip/stack/nic.go
+++ b/pkg/tcpip/stack/nic.go
@@ -1208,6 +1208,9 @@ func (n *NIC) Stack() *Stack {
// false. It will only return true if the address is associated with the NIC
// AND it is tentative.
func (n *NIC) isAddrTentative(addr tcpip.Address) bool {
+ n.mu.RLock()
+ defer n.mu.RUnlock()
+
ref, ok := n.mu.endpoints[NetworkEndpointID{addr}]
if !ok {
return false