From 7d61303e81c438084f3aff568e743bd50cab0ada Mon Sep 17 00:00:00 2001 From: JackDoan Date: Thu, 14 May 2026 11:45:45 -0500 Subject: [PATCH] snip --- overlay/tio/tio.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/overlay/tio/tio.go b/overlay/tio/tio.go index 20fcf388..6611ffa5 100644 --- a/overlay/tio/tio.go +++ b/overlay/tio/tio.go @@ -31,9 +31,10 @@ type Capabilities struct { type Queue interface { io.Closer - // Read will read at least 1 packet from the tun (up to len(p)) - // mem will be used to provide the backing for each of p[n].Bytes - // Returns the number of packets actually read, or error + // Read will read at least 1 packet from the tun (up to len(p)). + // mem will be used to provide the backing for each of p[n].Bytes. + // Callers should size mem and p to avoid exhausting mem before p. + // Returns the number of packets actually read, or error. Read(p []wire.TunPacket, mem []byte) (int, error) // Write emits a single packet on the plaintext (outside→inside)