mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Also don't send the token magic to unsupported clients
Since only the client can initiate the secure session, there's basically no reason to send this magic to clients which didn't advertise the feature.
This commit is contained in:
parent
3dd2f23d45
commit
0244640aca
|
@ -339,8 +339,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
|
|||
}
|
||||
|
||||
// simulate accept
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, SECURITY_TOKEN_MAGIC,
|
||||
sizeof(SECURITY_TOKEN_MAGIC), NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
|
||||
// Begin vanilla compatible token handshake
|
||||
// The idea is to pack a security token in the gametick
|
||||
|
@ -410,8 +409,7 @@ void CNetServer::OnPreConnMsg(NETADDR &Addr, CNetPacketConstruct &Packet)
|
|||
else
|
||||
{
|
||||
// accept client directy
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, SECURITY_TOKEN_MAGIC,
|
||||
sizeof(SECURITY_TOKEN_MAGIC), NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
SendControl(Addr, NET_CTRLMSG_CONNECTACCEPT, NULL, 0, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
|
||||
TryAcceptClient(Addr, NET_SECURITY_TOKEN_UNSUPPORTED);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue