From ca33a6a390a1140d2dced930d8965bad146b2502 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 20 Mar 2024 18:10:15 +0000 Subject: [PATCH] log invalid response packets --- pkg/udpproxy/session.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index e5afc77..6a760d4 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -65,7 +65,9 @@ func (s *Session) listen() error { func (s *Session) proxyFrom(buf []byte) error { if !s.isResponsePacket(buf) { - return nil + err := errors.New("not a response packet") + log.Error(err.Error()) + return err } s.updateTime = time.Now()