From 28489dcbc623527f0be10ac31903991c402087ad Mon Sep 17 00:00:00 2001
From: lanrenwo <lanrenwo@users.noreply.github.com>
Date: Wed, 19 Oct 2022 11:53:31 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=BD=AEgetByte51=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 server/handler/payload_access_audit.go | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/handler/payload_access_audit.go b/server/handler/payload_access_audit.go
index 25ca7b3..4697c87 100644
--- a/server/handler/payload_access_audit.go
+++ b/server/handler/payload_access_audit.go
@@ -109,6 +109,7 @@ func logAudit(cSess *sessdata.ConnSession, pl *sessdata.Payload) {
 	copy(key[16:32], ipDst)
 	binary.BigEndian.PutUint16(key[32:34], ipPort)
 	key[34] = byte(accessProto)
+	copy(key[35:51], []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
 
 	info := ""
 	nu := utils.NowSec().Unix()
@@ -163,9 +164,6 @@ func logAudit(cSess *sessdata.ConnSession, pl *sessdata.Payload) {
 					md5Sum := md5.Sum([]byte(info))
 					copy(key[35:51], md5Sum[:])
 				}
-			} else {
-				// 清空数据, 碰到使用上一个域名信息的问题
-				copy(key[35:51], []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
 			}
 		case flags & 0x19:
 			// URG