Subject: Patch to work with gvisor 20221219

From: John Goerzen <[email-masked]>
Date: Sat, 07 Jan 2023 08:20:55 -0600

Hi Sergey,

Here's a patch that Debian has added to NNCP to let it work with gvisor
20221219.  I imagine you may want to bump the gvisor dep version after
applying.

Thanks,

John

From: Shengjing Zhu <[email-masked]>
Date: Mon, 2 Jan 2023 05:29:59 +0800
Subject: gvisor 20221219

---
 src/yggdrasil/tcpip.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/yggdrasil/tcpip.go b/src/yggdrasil/tcpip.go
index a1a71ac..d399b3e 100644
--- a/src/yggdrasil/tcpip.go
+++ b/src/yggdrasil/tcpip.go
@@ -68,7 +68,7 @@ func (*TCPIPEndpoint) LinkAddress() tcpip.LinkAddress { return "" }
 
 func (*TCPIPEndpoint) Wait() {}
 
-func (e *TCPIPEndpoint) WritePacket(pkt *stack.PacketBuffer) tcpip.Error {
+func (e *TCPIPEndpoint) WritePacket(pkt stack.PacketBufferPtr) tcpip.Error {
 	v := pkt.ToView()
 	n, err := v.Read(e.writeBuf)
 	if err != nil {
@@ -99,13 +99,13 @@ func (e *TCPIPEndpoint) WritePackets(pbs stack.PacketBufferList) (int, tcpip.Err
 	return len(pbs.AsSlice()), nil
 }
 
-func (e *TCPIPEndpoint) WriteRawPacket(*stack.PacketBuffer) tcpip.Error {
+func (e *TCPIPEndpoint) WriteRawPacket(stack.PacketBufferPtr) tcpip.Error {
 	panic("not implemented")
 }
 
 func (*TCPIPEndpoint) ARPHardwareType() header.ARPHardwareType { return header.ARPHardwareNone }
 
-func (e *TCPIPEndpoint) AddHeader(*stack.PacketBuffer) {}
+func (e *TCPIPEndpoint) AddHeader(stack.PacketBufferPtr) {}
 
 func convertToFullAddr(ip net.IP, port int) (tcpip.FullAddress, tcpip.NetworkProtocolNumber) {
 	return tcpip.FullAddress{