summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/channel/channel.go
diff options
context:
space:
mode:
authorBhasker Hariharan <bhaskerh@google.com>2018-09-04 14:30:15 -0700
committerShentubot <shentubot@google.com>2018-09-04 14:31:52 -0700
commit2cff07381a911ad52cf9df70d702f39217e9539e (patch)
tree6ae3c3dd38e3c14302e0d053faf2b0106d66c467 /pkg/tcpip/link/channel/channel.go
parent9ae4e28f75979905a6396962a232e217323499f9 (diff)
Automated rollback of changelist 211156845
PiperOrigin-RevId: 211525182 Change-Id: I462c20328955c77ecc7bfd8ee803ac91f15858e6
Diffstat (limited to 'pkg/tcpip/link/channel/channel.go')
-rw-r--r--pkg/tcpip/link/channel/channel.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/tcpip/link/channel/channel.go b/pkg/tcpip/link/channel/channel.go
index 9d69f1d45..dd3fe7c87 100644
--- a/pkg/tcpip/link/channel/channel.go
+++ b/pkg/tcpip/link/channel/channel.go
@@ -71,6 +71,12 @@ func (e *Endpoint) Inject(protocol tcpip.NetworkProtocolNumber, vv *buffer.Vecto
e.dispatcher.DeliverNetworkPacket(e, "", protocol, &uu)
}
+// InjectLinkAddr injects an inbound packet with a remote link address.
+func (e *Endpoint) InjectLinkAddr(protocol tcpip.NetworkProtocolNumber, remoteLinkAddr tcpip.LinkAddress, vv *buffer.VectorisedView) {
+ uu := vv.Clone(nil)
+ e.dispatcher.DeliverNetworkPacket(e, remoteLinkAddr, protocol, &uu)
+}
+
// Attach saves the stack network-layer dispatcher for use later when packets
// are injected.
func (e *Endpoint) Attach(dispatcher stack.NetworkDispatcher) {