fix: gvisor stack's dns hijack not working
This commit is contained in:
parent
b538aa6ca2
commit
fdc9c01df1
1 changed files with 1 additions and 0 deletions
|
@ -149,6 +149,7 @@ func (h *ListenerHandler) NewPacketConnection(ctx context.Context, conn network.
|
|||
defer cancel()
|
||||
inData := readBuff.Bytes()
|
||||
writeBuff := readBuff
|
||||
writeBuff.Resize(writeBuff.Start(), 0)
|
||||
if writeBuff.Cap() < rwOptions.MTU { // only create a new buffer when space don't enough
|
||||
writeBuff = rwOptions.NewPacketBuffer()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue