From f08253bd4556bfb8079256871674a40c9528af9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 14 May 2022 00:29:26 +0800 Subject: [PATCH] fix: mtu --- gold/head/packet.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gold/head/packet.go b/gold/head/packet.go index 4faad59..d7b3170 100644 --- a/gold/head/packet.go +++ b/gold/head/packet.go @@ -110,13 +110,14 @@ func (p *Packet) Marshal(src net.IP, teatype uint8, datasz uint32, offset uint16 if src != nil { p.TeaTypeDataSZ = uint32(teatype)<<24 | datasz p.Src = src - p.Flags = offset & 0x1fff + offset &= 0x1fff if dontfrag { offset |= 0x4000 } if hasmore { offset |= 0x2000 } + p.Flags = offset } return helper.OpenWriterF(func(w *helper.Writer) {