diff options
author | Ian Gudger <igudger@google.com> | 2019-01-29 16:22:34 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-01-29 16:23:30 -0800 |
commit | ff1c3bb0b577a4ea55a64de39415a8d31142b741 (patch) | |
tree | 14bf8211ede352cdc4bae3ac8fd21dd9fc617c7c /pkg/tcpip/stack/nic.go | |
parent | 3c5f8dfd4b0a7157343bacb62620e4f11612c3b7 (diff) |
Fix NIC endpoint forwarding.
Also adds a test for regular NIC forwarding.
PiperOrigin-RevId: 231495279
Change-Id: Ic7edec249568e9ad0280cea77eac14478c9073e1
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index 770d288cf..586ca873e 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -428,6 +428,8 @@ func (n *NIC) DeliverNetworkPacket(linkEP LinkEndpoint, remote, _ tcpip.LinkAddr ref, ok := n.endpoints[NetworkEndpointID{dst}] n.mu.RUnlock() if ok && ref.tryIncRef() { + r.RemoteAddress = src + // TODO: Update the source NIC as well. ref.ep.HandlePacket(&r, vv) ref.decRef() } else { |