summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pkg/tcpip/stack/nic.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go
index 133e6e76b..63c31aef4 100644
--- a/pkg/tcpip/stack/nic.go
+++ b/pkg/tcpip/stack/nic.go
@@ -1238,6 +1238,14 @@ func (n *NIC) DeliverNetworkPacket(linkEP LinkEndpoint, remote, local tcpip.Link
//
// TODO: Should we be forwarding the packet even if promiscuous?
if n.stack.Forwarding() {
+ // Implement weak host model when forwarding is enabled
+ for _, nic := range n.stack.nics {
+ if ref := nic.getRef(protocol, dst); ref != nil {
+ handlePacket(n, protocol, dst, src, linkEP.LinkAddress(), remote, ref, pkt)
+ return
+ }
+ }
+
r, err := n.stack.FindRoute(0, "", dst, protocol, false /* multicastLoop */)
if err != nil {
n.stack.stats.IP.InvalidDestinationAddressesReceived.Increment()