diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-03-11 00:54:49 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-03-11 00:54:49 +0000 |
commit | c0100acc5d77703465a0ccb4a9edf6c5ecd482af (patch) | |
tree | aa589e20ef36625dec38a31f00f9bc74dfc9b18c /pkg/tcpip/stack/nic.go | |
parent | 5c95a1e918b90a8f32a9df415ed508eec4b259db (diff) | |
parent | f56fe66b13b979f2ac96e8fce6fb0a5dec9a32e0 (diff) |
Merge release-20200219.0-134-gf56fe66 (automated)
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index cd9202aed..e46bd86c6 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. - pkt.Header = buffer.NewPrependableFromView(pkt.Data.First()) - pkt.Data.RemoveFirst() + // TODO(b/143425874): Decrease the TTL field in forwarded packets. + // 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 |