From ffd68d6c81fdc4d8d9b1570e7d86d6f0a911c043 Mon Sep 17 00:00:00 2001 From: XinJun Ma Date: Sun, 31 Dec 2023 18:23:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=81=B5=E5=BE=AA=20DPD-REQ=20=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=EF=BC=8C=E4=BF=AE=E5=A4=8D=20OpenConnect=20DTLS=20?= =?UTF-8?q?=E7=9A=84=20MTU=20=E6=8E=A2=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/handler/link_dtls.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/handler/link_dtls.go b/server/handler/link_dtls.go index 1888675..2656855 100644 --- a/server/handler/link_dtls.go +++ b/server/handler/link_dtls.go @@ -64,6 +64,7 @@ func LinkDtls(conn net.Conn, cSess *sessdata.ConnSession) { case 0x03: // DPD-REQ // base.Debug("recv DPD-REQ", cSess.IpAddr) pl.PType = 0x04 + pl.Data = pl.Data[:n] if payloadOutDtls(cSess, dSess, pl) { return } @@ -149,7 +150,7 @@ func dtlsWrite(conn net.Conn, dSess *sessdata.DtlsSession, cSess *sessdata.ConnS } } else { // 设置头类型 - pl.Data = append(pl.Data[:0], pl.PType) + pl.Data[0] = pl.PType } n, err := conn.Write(pl.Data) if err != nil {