Bug #23389

Updated by Sickboy almost 6 years ago

Tested with 1.60 beta (83657) and 1.59 official version.

h2. Observed

When any of the server-info fields (non player info fields (name/team/score/deaths), say modhash, cannot fit by itself in a single packet,
the server will resend the field name (8 bytes in case of modhash) and the same 1375 1376 bytes of the value in all following packets (up to 7 packets total, the max).
(1400 max packet length minus 16 bytes for ID string and splitnum, and 8 bytes in this case that represent the field name "modhash"+\x00, and 1 byte at the end again \x00) "modhash"+\x00)

See the following pastie, illustrating 7 packets received by querying the server,
the first packet contains all the server info up to modhash (that means "hash" field is missing and the player info too).
Of the modhash only a part is included in this packet. In the 6 following packets, 8 bytes fieldname and 1375 1376 bytes of the modhash is repeated: repeated, .

Player info (name, team, score, deaths) are properly split over packets.

h2. Expected

When the value of a server info field cannot fit in a single packet, it should be split over multiple packets (just like the player-info), not repeating the same content until packet limit is reached.

h2. Reproducability

Query a server who's modhash doesn't fit in a single packet.
This modline with these mods installed would do that:

Both my custom SU server query and the HLSW tool expose the problem, in this case, showing that the modhash is incomplete (last entry in the list does not have correct length), and "hash" and player info is missing.

Another, easier way, to reproduce the problem is probably by faking a long modline that exceeds say 1400 bytes.