From 688d4da4b7d530d5125dc46b4a61b9c167bcd5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 25 Jul 2023 08:12:56 +0800 Subject: [PATCH] Fix gVisor UDP --- gvisor_udp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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())