Don't respond to challenges out of sequence

This commit is contained in:
AJ Martinez 2023-03-18 22:13:19 -07:00 committed by James R
parent c46ad8d52b
commit cc0390cc64

View file

@ -4595,6 +4595,8 @@ static void HandlePacketFromAwayNode(SINT8 node)
PT_ClientKey(node);
break;
case PT_SERVERCHALLENGE:
if (cl_mode != CL_WAITCHALLENGE)
break;
memcpy(awaitingChallenge, netbuffer->u.serverchallenge.secret, sizeof(awaitingChallenge));
cl_mode = CL_ASKJOIN;
break;