summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-29 04:14:50 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-29 04:14:50 +0000
commita051e260a93adbfbd35451d1d9a3482c2765fa3d (patch)
treeb74b6b0eded07374552b7530302558b723b852cd /pkg/tcpip
parentb19acb29e422d24e41d827981a904807542368d2 (diff)
parentb81b5883c747dcd019a228e109dbe52514710a88 (diff)
Merge release-20210125.0-23-gb81b5883c (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/stack/linkaddrcache.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/stack/linkaddrcache.go b/pkg/tcpip/stack/linkaddrcache.go
index 3ce7a57db..930b8f795 100644
--- a/pkg/tcpip/stack/linkaddrcache.go
+++ b/pkg/tcpip/stack/linkaddrcache.go
@@ -148,10 +148,10 @@ func (c *linkAddrCache) AddLinkAddress(k tcpip.Address, v tcpip.LinkAddress) {
c.mu.Lock()
entry := c.getOrCreateEntryLocked(k)
- c.mu.Unlock()
-
entry.mu.Lock()
defer entry.mu.Unlock()
+ c.mu.Unlock()
+
entry.mu.linkAddr = v
entry.changeStateLocked(ready, expiration)
}
@@ -201,10 +201,10 @@ func (c *linkAddrCache) getOrCreateEntryLocked(k tcpip.Address) *linkAddrEntry {
// get reports any known link address for k.
func (c *linkAddrCache) get(k tcpip.Address, linkRes LinkAddressResolver, localAddr tcpip.Address, nic NetworkInterface, onResolve func(LinkResolutionResult)) (tcpip.LinkAddress, <-chan struct{}, tcpip.Error) {
c.mu.Lock()
- defer c.mu.Unlock()
entry := c.getOrCreateEntryLocked(k)
entry.mu.Lock()
defer entry.mu.Unlock()
+ c.mu.Unlock()
switch s := entry.mu.s; s {
case ready: