Browse Source

Modified unknown packet ver message to provide more data as on what it believes is an invalid packet ver (e.g. useful to know whether its because of an obfuscated packet header etc)

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16302 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 years ago
parent
commit
b7a96033f5
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/map/clif.c

+ 5 - 4
src/map/clif.c

@@ -16113,9 +16113,8 @@ static int clif_parse(int fd)
 	} else {
 		// check authentification packet to know packet version
 		packet_ver = clif_guess_PacketVer(fd, 0, &err);
-		if( err )
-		{// failed to identify packet version
-			ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s.\n", fd, (
+		if( err ) {// failed to identify packet version
+			ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s (p:0x%04x|l:%d).\n", fd, (
 				err == 1 ? "" :
 				err == 2 ? ", possibly for having an invalid account_id" :
 				err == 3 ? ", possibly for having an invalid char_id." :
@@ -16124,14 +16123,16 @@ static int clif_parse(int fd)
 				err == 5 ? ", possibly for having an invalid client_tick." :
 				*/
 				err == 6 ? ", possibly for having an invalid sex." :
-				". ERROR invalid error code"));
+				". ERROR invalid error code"), cmd, RFIFOREST(fd));
 			WFIFOHEAD(fd,packet_len(0x6a));
 			WFIFOW(fd,0) = 0x6a;
 			WFIFOB(fd,2) = 3; // Rejected from Server
 			WFIFOSET(fd,packet_len(0x6a));
+			
 #ifdef DUMP_INVALID_PACKET
 			ShowDump(RFIFOP(fd,0), RFIFOREST(fd));
 #endif
+			
 			RFIFOSKIP(fd, RFIFOREST(fd));
 			set_eof(fd);
 			return 0;