summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-28 21:42:57 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-28 21:42:57 +0000
commit8ea00f4541a0ec977d367837b8c752fddfbeadd4 (patch)
treeb0b65b731bb0727550343b090250a84df72b1a08 /pkg/tcpip/stack
parent62daea73a85389e465e8b53a0dce9ac1f080e049 (diff)
parentd5787f628c40624db4d9d2a970f7e672bb006852 (diff)
Merge release-20200818.0-85-gd5787f628 (automated)
Diffstat (limited to 'pkg/tcpip/stack')
-rw-r--r--pkg/tcpip/stack/nic.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go
index 8e700990d..863ef6bee 100644
--- a/pkg/tcpip/stack/nic.go
+++ b/pkg/tcpip/stack/nic.go
@@ -676,10 +676,10 @@ func (n *NIC) getRefOrCreateTemp(protocol tcpip.NetworkProtocolNumber, address t
}
// A usable reference was not found, create a temporary one if requested by
- // the caller or if the address is found in the NIC's subnets and the NIC is
- // a loopback interface.
+ // the caller or if the IPv4 address is found in the NIC's subnets and the NIC
+ // is a loopback interface.
createTempEP := spoofingOrPromiscuous
- if !createTempEP && n.isLoopback() {
+ if !createTempEP && n.isLoopback() && protocol == header.IPv4ProtocolNumber {
for _, r := range n.mu.endpoints {
addr := r.addrWithPrefix()
subnet := addr.Subnet()