summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/nic.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-11 06:07:52 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-11 06:08:56 -0700
commit7bca09107b4efc0a7f36f932612061f13a146d6f (patch)
tree468727e48fda6a4445cdb1cc5463089855f47444 /pkg/tcpip/stack/nic.go
parent24e7005ab6bd025f79da46883bd31151fab72147 (diff)
Automated rollback of changelist 300217972
PiperOrigin-RevId: 300308974
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