summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/channel
diff options
context:
space:
mode:
authorBert Muthalaly <stijlist@google.com>2018-09-19 13:42:55 -0700
committerShentubot <shentubot@google.com>2018-09-19 13:43:58 -0700
commit2e497de2d9f6c410a214faae9962e762757b0648 (patch)
tree992c064bd360dc50f8369d76d1481e5eb58ec612 /pkg/tcpip/link/channel
parentf0a92b6b67382a1f8da5ef2622c59afdb1c40f13 (diff)
Pass local link address to DeliverNetworkPacket
This allows a NetworkDispatcher to implement transparent bridging, assuming all implementations of LinkEndpoint.WritePacket call eth.Encode with header.EthernetFields.SrcAddr set to the passed Route.LocalLinkAddress, if it is provided. PiperOrigin-RevId: 213686651 Change-Id: I446a4ac070970202f0724ef796ff1056ae4dd72a
Diffstat (limited to 'pkg/tcpip/link/channel')
-rw-r--r--pkg/tcpip/link/channel/channel.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/tcpip/link/channel/channel.go b/pkg/tcpip/link/channel/channel.go
index 8b680de7c..113cbbf5e 100644
--- a/pkg/tcpip/link/channel/channel.go
+++ b/pkg/tcpip/link/channel/channel.go
@@ -72,7 +72,7 @@ func (e *Endpoint) Inject(protocol tcpip.NetworkProtocolNumber, vv buffer.Vector
// InjectLinkAddr injects an inbound packet with a remote link address.
func (e *Endpoint) InjectLinkAddr(protocol tcpip.NetworkProtocolNumber, remoteLinkAddr tcpip.LinkAddress, vv buffer.VectorisedView) {
- e.dispatcher.DeliverNetworkPacket(e, remoteLinkAddr, protocol, vv.Clone(nil))
+ e.dispatcher.DeliverNetworkPacket(e, remoteLinkAddr, "" /* localLinkAddr */, protocol, vv.Clone(nil))
}
// Attach saves the stack network-layer dispatcher for use later when packets