1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-27 14:20:27 +08:00

fix: addtional data error

This commit is contained in:
源文雨
2023-08-04 17:09:54 +08:00
parent 8163c38884
commit 6f75de6b95
2 changed files with 22 additions and 1 deletions

View File

@@ -72,7 +72,7 @@ func (l *Link) encrypt(p *head.Packet, sndcnt uint16, teatype uint8) {
logrus.Debugln("[send] data len after zstd:", len(p.Data))
}
if l.aead != nil {
p.Data = l.EncodePreshared(sndcnt, p.Data)
p.Data = l.EncodePreshared(sndcnt&0x0fff, p.Data)
logrus.Debugln("[send] data len after xchacha20:", len(p.Data))
}
p.Data = l.Encode(teatype, p.Data)