From 0935fc1190716424444f351f15b33d76e51e36b5 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 3 Apr 2024 20:59:37 +0100 Subject: [PATCH] rename isBadRconRequest to isBadRconResponse --- pkg/udpproxy/session.go | 2 +- pkg/udpproxy/validator.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/udpproxy/session.go b/pkg/udpproxy/session.go index 9e31d10..01ef60e 100644 --- a/pkg/udpproxy/session.go +++ b/pkg/udpproxy/session.go @@ -64,7 +64,7 @@ func (s *session) proxyFrom(buf []byte) error { } if s.isRconResponsePacket(buf) { - if s.isBadRconRequest(buf) { + if s.isBadRconResponse(buf) { log.Infof("Response: Bad rcon from %s", s.caddr.IP) } else { log.Debugf("Response: %s", string(buf[10:])) diff --git a/pkg/udpproxy/validator.go b/pkg/udpproxy/validator.go index 0ff8370..b993edd 100644 --- a/pkg/udpproxy/validator.go +++ b/pkg/udpproxy/validator.go @@ -27,6 +27,6 @@ func (v *validator) isValidResponsePacket(buf []byte) bool { return v.isRconResponsePacket(buf) || v.isQueryResponsePacket(buf) } -func (v *validator) isBadRconRequest(buf []byte) bool { +func (v *validator) isBadRconResponse(buf []byte) bool { return string(buf[10:18]) == "Bad rcon" }