summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/nic.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-11 13:13:54 +0000
committergVisor bot <gvisor-bot@google.com>2020-03-11 13:13:54 +0000
commitc0cc75eccc47faeaec8dc03c147850ddf637bf85 (patch)
tree89921404704339b02cfd0b5e5c9e0db6d24082cb /pkg/tcpip/stack/nic.go
parent1041d6c67e6406e5a9780934a1c3e6786f214cb6 (diff)
parent7bca09107b4efc0a7f36f932612061f13a146d6f (diff)
Merge release-20200219.0-137-g7bca091 (automated)
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-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 e46bd86c6..cd9202aed 100644
--- a/pkg/tcpip/stack/nic.go
+++ b/pkg/tcpip/stack/nic.go
@@ -1246,10 +1246,10 @@ func (n *NIC) DeliverNetworkPacket(linkEP LinkEndpoint, remote, local tcpip.Link
}
func (n *NIC) forwardPacket(r *Route, protocol tcpip.NetworkProtocolNumber, pkt tcpip.PacketBuffer) {
- // TODO(b/143425874): Decrease the TTL field in forwarded packets.
+ // TODO(b/143425874) Decrease the TTL field in forwarded packets.
+ pkt.Header = buffer.NewPrependableFromView(pkt.Data.First())
+ pkt.Data.RemoveFirst()
- // pkt.Header should have enough capacity to hold the link's headers.
- pkt.Header = buffer.NewPrependable(int(n.linkEP.MaxHeaderLength()))
if err := n.linkEP.WritePacket(r, nil /* gso */, protocol, pkt); err != nil {
r.Stats().IP.OutgoingPacketErrors.Increment()
return