NATNEG: Fix inversed condition

This commit is contained in:
mkwcat
2023-11-05 20:05:33 -05:00
parent 08df838aba
commit a8dc7d0cbc

View File

@@ -57,7 +57,7 @@ func StartServer() {
func handleConnection(conn net.PacketConn, addr net.Addr, buffer []byte) {
// Validate the packet magic
if bytes.Equal(buffer[:6], []byte{0xfd, 0xfc, 0x1e, 0x66, 0x6a, 0xb2}) {
if !bytes.Equal(buffer[:6], []byte{0xfd, 0xfc, 0x1e, 0x66, 0x6a, 0xb2}) {
logging.Error("NATNEG:"+addr.String(), "Invalid packet header")
return
}