diff --git a/gvisor_udp.go b/gvisor_udp.go index 0c02823..077cf0b 100644 --- a/gvisor_udp.go +++ b/gvisor_udp.go @@ -47,7 +47,7 @@ func (f *UDPForwarder) HandlePacket(id stack.TransportEndpointID, pkt stack.Pack } else { f.cacheProto = header.IPv6ProtocolNumber } - gBuffer := pkt.ToBuffer() + gBuffer := pkt.Data().ToBuffer() sBuffer := buf.NewSize(int(gBuffer.Size())) gBuffer.Apply(func(view *buffer.View) { sBuffer.Write(view.AsSlice())