mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 13:16:58 +02:00
cap RX buffers in UDP rather than callers
This commit is contained in:
+1
-1
@@ -231,7 +231,7 @@ func (f *Interface) handleOutsideRelayPacket(hostinfo *HostInfo, via ViaSender,
|
||||
case ForwardingType:
|
||||
// Forward this packet through the relay tunnel, rebuilding it in place.
|
||||
// Encode overwrites the old outer header, and the new AEAD tag lands where the old one was
|
||||
fwdBuf := packet[:0:len(packet)] // Cap to len(packet) to protect memory from a larger parent buffer
|
||||
fwdBuf := packet[:0]
|
||||
//todo it would potentially be nice to batch these
|
||||
f.SendVia(targetHI, targetRelay, signedPayload, nb, fwdBuf, true, q)
|
||||
case TerminalType:
|
||||
|
||||
Reference in New Issue
Block a user