mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-24 04:27:08 +08:00
fix: mtu
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user