1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-24 04:27:08 +08:00
This commit is contained in:
源文雨
2022-05-14 00:29:26 +08:00
parent a948c15fa8
commit f08253bd45

View File

@@ -110,13 +110,14 @@ func (p *Packet) Marshal(src net.IP, teatype uint8, datasz uint32, offset uint16
if src != nil { if src != nil {
p.TeaTypeDataSZ = uint32(teatype)<<24 | datasz p.TeaTypeDataSZ = uint32(teatype)<<24 | datasz
p.Src = src p.Src = src
p.Flags = offset & 0x1fff offset &= 0x1fff
if dontfrag { if dontfrag {
offset |= 0x4000 offset |= 0x4000
} }
if hasmore { if hasmore {
offset |= 0x2000 offset |= 0x2000
} }
p.Flags = offset
} }
return helper.OpenWriterF(func(w *helper.Writer) { return helper.OpenWriterF(func(w *helper.Writer) {