summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/route.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-10-14 17:45:29 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-14 17:46:52 -0700
commitbfa0bb24dd73072b3ccfe302afa89d1b5d46b927 (patch)
tree5f02b19336706222fe8e63ef816b241852c2c083 /pkg/tcpip/stack/route.go
parent35d35ea5d04f71ec14561f585ae8d71676c2b655 (diff)
Internal change.
PiperOrigin-RevId: 274700093
Diffstat (limited to 'pkg/tcpip/stack/route.go')
-rw-r--r--pkg/tcpip/stack/route.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/tcpip/stack/route.go b/pkg/tcpip/stack/route.go
index 22db619a1..e72373964 100644
--- a/pkg/tcpip/stack/route.go
+++ b/pkg/tcpip/stack/route.go
@@ -154,16 +154,12 @@ func (r *Route) IsResolutionRequired() bool {
}
// WritePacket writes the packet through the given route.
-func (r *Route) WritePacket(gso *GSO, hdr buffer.Prependable, payload buffer.VectorisedView, protocol tcpip.TransportProtocolNumber, ttl uint8, useDefaultTTL bool) *tcpip.Error {
+func (r *Route) WritePacket(gso *GSO, hdr buffer.Prependable, payload buffer.VectorisedView, params NetworkHeaderParams) *tcpip.Error {
if !r.ref.isValidForOutgoing() {
return tcpip.ErrInvalidEndpointState
}
- if useDefaultTTL {
- ttl = r.DefaultTTL()
- }
-
- err := r.ref.ep.WritePacket(r, gso, hdr, payload, protocol, ttl, r.loop)
+ err := r.ref.ep.WritePacket(r, gso, hdr, payload, params, r.loop)
if err != nil {
r.Stats().IP.OutgoingPacketErrors.Increment()
} else {