diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-02-06 21:30:25 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-06 21:30:25 +0000 |
commit | 4f3d6f2aa9256bdeca2e81859fd4336c8ae5b05b (patch) | |
tree | a15ac2a5b5d21c0c0bb5a26da53913d58197984b /pkg/tcpip/stack | |
parent | e4266e460e53a4cab765167ed9ff0c393433e737 (diff) | |
parent | c5afaf2854679fbb7470f9a615d3c0fbb2af0999 (diff) |
Merge release-20210125.0-95-gc5afaf285 (automated)
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r-- | pkg/tcpip/stack/stack.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go index 3bb3f61b2..07cd88a6a 100644 --- a/pkg/tcpip/stack/stack.go +++ b/pkg/tcpip/stack/stack.go @@ -2063,24 +2063,6 @@ func generateRandInt64() int64 { return v } -// FindNetworkEndpoint returns the network endpoint for the given address. -// -// Returns nil if the address is not associated with any network endpoint. -func (s *Stack) FindNetworkEndpoint(netProto tcpip.NetworkProtocolNumber, address tcpip.Address) NetworkEndpoint { - s.mu.RLock() - defer s.mu.RUnlock() - - for _, nic := range s.nics { - addressEndpoint := nic.getAddressOrCreateTempInner(netProto, address, false /* createTemp */, NeverPrimaryEndpoint) - if addressEndpoint == nil { - continue - } - addressEndpoint.DecRef() - return nic.getNetworkEndpoint(netProto) - } - return nil -} - // FindNICNameFromID returns the name of the NIC for the given NICID. func (s *Stack) FindNICNameFromID(id tcpip.NICID) string { s.mu.RLock() |