clif_parse: Disconnecting session #4 with unknown packet version (p:0x7f57,l:19)

That message is the most issue for recent users that don’t follow emulator development. That message because the client sends unknown packet to the server (as the message said). This “clif_parse: Disconnecting session #4 with unknown packet version (p:0x7f57,l:19)” has certain pattern, so it is not always with exact same message. The part that maybe changed in that message is the sessio_id, the packet_id in hexadecimal, and the packet’s length.

The disconnection is caused by Packet Obfuscation feature that was implemented since rAthena 1b69b98. This feature will recalculates the packet_id with certain algorithm. It’s a simple cryptography implementation featured by kRO clients. As an example, packet 0x068 maybe will be recalculated to 0x312.

These are other sample of the ‘disconnecting’ message because invalid packet.

clif_parse: Disconnecting session #<session_id> with unknown packet version (p:<packet_id>,l:<packet_length>)

clif_parse: Disconnecting session #4 with unknown packet version (p:0x7f57,l:19)
clif_parse: Disconnecting session #8 with unknown packet version (p: 0x089c,l:19)

How to fix it? There are 2 ways to fix this error.

Disable packet encryption and turn off server PACKET_OBFUSCATION

By using this solution, the client will sends the raw packet_id.

  1. Select the “Disable packet encryption” while diffing the client (example by using NEMO). The client will sends the raw packet_id to the server.

    Disable Packet Encryption on kRO Client using NEMO
    Disable Packet Encryption on kRO Client using NEMO
  2. Open src/config/core.h.
  3. Comment this define

    /// Comment to disable the official packet obfuscation support.
    /// When enabled, make sure there is value for ‘packet_keys’ of used packet version or
    /// defined ‘packet_keys_use’ in db/[import/]packet_db.txt.
    /// This requires PACKETVER 2011-08-17 or newer.
    #define PACKET_OBFUSCATION

  4. Recomplie your server.

Enable the packet encryption and set the encryption keys

If you still want to enable the packet encryption, you need to make sure that client has the correct 3-encryption keys.

  1. Make sure to uncheck the  “Disable packet encryption” while diffing the client (example by using NEMO).

    Enable Packet Encryption on kRO Client using NEMO
    Enable Packet Encryption on kRO Client using NEMO
  2. Find the “Packet First Key Encryption”“Packet Second Key Encryption”, and “Packet Third Key Encryption”. If you want to use default key, you don’t need to change those values.
  3. Make sure your server is compiled with PACKET_OBFUSCATION core enabled.

And if you redefined the 3-encryption keys while diffing, you need to match the keys too on your server. Open the /db/import/packet_db.txt then add 3-keys value in hexadecimal format.

packet_keys_use: 0x[first_key],0x[second_key],0x[third_key]

Or if you want to use default values, the 3-keys are based on the client version. Here the list for encryption keys based on packet version from /db/packet_db.txt.

  • 28 (2011-11-02aRagexe): 0x5324329D,0x5D545D52,0x06137269
  • 29 (2012-03-07fRagexeRE): 0x382A6DEF,0x5CBE7202,0x61F46637
  • 30 (2012-04-10aRagexeRE): 0x01581359,0x452D6FFA,0x6AFB6E2E
  • 31 (2012-04-18aRagexeRE): 0x01540E48,0x13041224,0x31247924
  • 32 (2012-06-18): 0x261F261F,0x261F261F,0x261F261F
  • 33 (2012-07-02aRagexeRE): 0x25733B31,0x53486CFD,0x398649BD
  • 34 (2013-03-20Ragexe): 0x3F094C49,0x55F86C1E,0x58AA359A
  • 35 (2013-05-15aRagexe): 0x75794A38,0x58A96BC1,0x296E6FB8
  • 36 (2013-05-22Ragexe): 0x6948050B,0x06511D9D,0x725D4DF1
  • 37 (2013-05-29Ragexe): 0x023A6C87,0x14BF1F1E,0x5CC70CC9
  • 38 (2013-06-05Ragexe): 0x646E08D9,0x5F153AB5,0x61B509B5
  • 39 (2013-06-12Ragexe): 0x6D166F66,0x3C000FCF,0x295B0FCB
  • 40 (2013-06-18Ragexe): 0x434115DE,0x34A10FE9,0x6791428E
  • 41 (2013-06-26Ragexe): 0x38F453EF,0x6A040FD8,0X65BD6668
  • 42 (2013-07-03Ragexe): 0x4FF90E23,0x0F1432F2,0x4CFA1EDA
  • 43 (2013-07-10Ragexe): 0x458F758F,0x4CCF3F8F,0x4A9C4237
  • 44 (2013-07-17Ragexe): 0x2BED4F91,0x5F9E00CF,0x5EE5520C
  • 45 (2013-08-07Ragexe): 0x7E241DE0,0x5E805580,0x3D807D80
  • 46 (2013-12-23Ragexe): 0x631C511C,0x111C111C,0x111C111C
  • 50 (2014-10-16Ragexe): 0x2DFF467C,0x444B37EE,0x2C1B634F
  • 51 (2014-10-22bRagexe): 0x290551EA,0x2B952C75,0x2D67669B
  • 52 (2015-05-13aRagexe): 0x62C86D09,0x75944F17,0x112C133D
  • 53 (2015-09-16Ragexe): 0x17F83A19,0x116944F4,0x1CC541E9
  • 54 (2015-10-01bRagexeRE): 0x45B945B9,0x45B945B9,0x45B945B9
  • 55 (2015-11-04aRagexe): 0x4C17382A,0x7ED174C9,0x29961E4F

Article written by

PServeRO is website that provides ragnarok modification, source modification, custom commands. Customization for ragnarok online or ragnarok offline. Also, guides to make your own ragnarok server, installation guides, step by step to make ragnarok server. Ragnarok modification based on eAthena, rAthena, 3CeAM, Hercules, and idAthena.

Please comment with your real name using good manners.

Leave a Reply

You must be logged in to post a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.