]> de.git.xonotic.org Git - xonotic/darkplaces.git/commit
crypto: avoid generating control-like packets
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 19 Apr 2011 15:31:26 +0000 (15:31 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Wed, 20 Apr 2011 07:46:36 +0000 (09:46 +0200)
commit4e8aa087626e03094d4ebfe688dd209414702010
tree2c966a94e77db67125619f883337a101b8c9f3af
parentb393a927a1a43c4a17536f503d752bbc0895daf0
crypto: avoid generating control-like packets

In non-AES mode, we now replace packets whose hash starts with FFFFFFFF by
7FFFFFFF, and 8000LLLL by 0000LLLL. When decoding, packets with these prefixes
have two attempts.

AES encrypted mode is unaffected by this, as there packets always start with a
byte from 00 to 0F.

Also, no longer whine about receiving packets that fail the HMAC test when the
packets look like control packets (the NQ CONNECT packet DP sends when
connecting sometimes was received in time for this to match).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11068 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=294762940c3d8fb26989ce5fa0f8d2588d5e5a2e
crypto.c