diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-11-14 18:19:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-11-14 18:19:35 +0000 |
commit | aac22c4734706966cecec88a94a51082594e32fc (patch) | |
tree | eb4fe50786baf0966e6ba7b8cdb0f23af47349ea /pkg/tcpip/transport/udp/endpoint.go | |
parent | f92854de80c4c466015ea7ee37c9cdc1a4d01ea8 (diff) | |
parent | 3f7d9370909a598cf83dfa07a1e87545a66e182f (diff) |
Merge release-20191104.0-40-g3f7d937 (automated)
Diffstat (limited to 'pkg/tcpip/transport/udp/endpoint.go')
-rw-r--r-- | pkg/tcpip/transport/udp/endpoint.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go index dda7af910..2d97d1398 100644 --- a/pkg/tcpip/transport/udp/endpoint.go +++ b/pkg/tcpip/transport/udp/endpoint.go @@ -817,7 +817,10 @@ func sendUDP(r *stack.Route, data buffer.VectorisedView, localPort, remotePort u if useDefaultTTL { ttl = r.DefaultTTL() } - if err := r.WritePacket(nil /* gso */, hdr, data, stack.NetworkHeaderParams{Protocol: ProtocolNumber, TTL: ttl, TOS: tos}); err != nil { + if err := r.WritePacket(nil /* gso */, stack.NetworkHeaderParams{Protocol: ProtocolNumber, TTL: ttl, TOS: tos}, tcpip.PacketBuffer{ + Header: hdr, + Data: data, + }); err != nil { r.Stats().UDP.PacketSendErrors.Increment() return err } |