Added missing 0x20 in DCS EncodeDisconnectPacket#223
Conversation
As is, EncodeDisconnectPacket will fail IsValidDisconnectPacket check. The encoded packet is only has 18 bytes instead of 19 because it's missing a 0x20.
|
@dimant: It was actually 19 bytes, with your change it is now 20 bytes! I think your added 0x20 is correct but you should also remove the very last 0x00, then it will match the disconnect packets generated by ircddbgateway (I did just sniff them to compare). This is from XLX (without your change): This is from ircddbgateway: Curiously "real" DCS reflectors doesn't even send these disconnect packets on timeout, they just drop client. |
|
It makes no real sense to send a disconnect packet on client timeout, since the client is the one that has failed and it is reasonable to assume it is not there anymore. It would be just a courtesy action just in case, but could be useful for debug purposes. |
Removed last byte of disconnect packet to ensure equivalence with ircdbgw.
My bad, thanks for the catch. Also I didn't know "real" reflectors don't send these packets, thanks for the info! |
As is, EncodeDisconnectPacket will fail IsValidDisconnectPacket check. The encoded packet is only has 18 bytes instead of 19 because it's missing a 0x20.