summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/network/arp
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-01-23 00:27:43 +0000
committergVisor bot <gvisor-bot@google.com>2021-01-23 00:27:43 +0000
commit1f6dc138a498f6feee2164f2b06834f650679ace (patch)
tree3fea111fe57b8fe0db7bf45c7066731d604274d6 /pkg/tcpip/network/arp
parent21c64a9aad986590172ef814f2bd0335a2b88399 (diff)
parent18ebec0ec957f1af0af3aa8fc2145c394552e042 (diff)
Merge release-20210112.0-78-g18ebec0ec (automated)
Diffstat (limited to 'pkg/tcpip/network/arp')
-rw-r--r--pkg/tcpip/network/arp/arp.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/network/arp/arp.go b/pkg/tcpip/network/arp/arp.go
index 9255a4f6a..0616b10aa 100644
--- a/pkg/tcpip/network/arp/arp.go
+++ b/pkg/tcpip/network/arp/arp.go
@@ -262,10 +262,10 @@ func (p *protocol) LinkAddressRequest(targetAddr, localAddr tcpip.Address, remot
nicID := nic.ID()
if len(localAddr) == 0 {
- addr, err := p.stack.GetMainNICAddress(nicID, header.IPv4ProtocolNumber)
- if err != nil {
+ addr, ok := p.stack.GetMainNICAddress(nicID, header.IPv4ProtocolNumber)
+ if !ok {
stats.OutgoingRequestInterfaceHasNoLocalAddressErrors.Increment()
- return err
+ return tcpip.ErrUnknownNICID
}
if len(addr.Address) == 0 {