diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-09-13 17:59:11 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-13 17:59:11 +0000 |
commit | c52da35bf77f09748a21f06b313f40bbb1b95a17 (patch) | |
tree | 5e344a8223d00c10a385b62578726e3ec685dd5b /pkg/tcpip | |
parent | f5d6b2d168bce450a1a2cd9e36f2ee8f0bcc1cc1 (diff) | |
parent | 6bcacb2fd17fadefbc9fb2eed9059eb36ae2783b (diff) |
Merge release-20210830.0-34-g6bcacb2fd (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index bb56ca9cb..a796942ab 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -41,17 +41,6 @@ func (l *linkResolver) confirmReachable(addr tcpip.Address) { var _ NetworkInterface = (*nic)(nil) -// TODO(https://gvisor.dev/issue/6558): Use an anonymous struct in nic for this -// once copylocks supports anonymous structs. -type packetEPs struct { - mu sync.RWMutex - - // eps is protected by the mutex, but the values contained in it are not. - // - // +checklocks:mu - eps map[tcpip.NetworkProtocolNumber]*packetEndpointList -} - // nic represents a "network interface card" to which the networking stack is // attached. type nic struct { @@ -85,7 +74,14 @@ type nic struct { promiscuous bool } - packetEPs packetEPs + packetEPs struct { + mu sync.RWMutex + + // eps is protected by the mutex, but the values contained in it are not. + // + // +checklocks:mu + eps map[tcpip.NetworkProtocolNumber]*packetEndpointList + } } // makeNICStats initializes the NIC statistics and associates them to the global |