aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wow.c
diff options
context:
space:
mode:
authorVasily Utkin <vautkin@teknik.io>2021-05-06 00:16:13 +0200
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-05-06 04:10:13 +0000
commit8d0e1b798d4c6323af382bf94435735b5d19e3e8 (patch)
tree3be0f8b6a4b2f21788a857510e6edbe453cbc84c /epan/dissectors/packet-wow.c
parent4397eed75c6f5ba81eec6af846f1a46050dc79d9 (diff)
packet-wow: Correct protocol_version field
Fixes a very small part of #11398. The fields were incorrectly identified as error fields because Mangos, the most popular open source emulator in 2009 incorrectly identified it as such. Reverse engineering of the client revealed that the fields were protocol versions. As well as misidentifying the field, the WOW_SERVER_TO_CLIENT version also read the wrong field. The actual error field is the one that comes after the protocol version field. Correct packets are in Ember WOW_CLIENT_TO_SERVER https://github.com/EmberEmu/Ember/blob/03c130d3d6276e7032fc9e13c9d287ea7c6ed536/src/login/grunt/client/LoginChallenge.h#L39 WOW_SERVER_TO_CLIENT https://github.com/EmberEmu/Ember/blob/03c130d3d6276e7032fc9e13c9d287ea7c6ed536/src/login/grunt/server/LoginChallenge.h#L33 As well as the Wiki https://wowdev.wiki/Packets/Login/Vanilla#Challenge_packets
Diffstat (limited to 'epan/dissectors/packet-wow.c')
-rw-r--r--epan/dissectors/packet-wow.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/epan/dissectors/packet-wow.c b/epan/dissectors/packet-wow.c
index a82e773caa..2d47799e48 100644
--- a/epan/dissectors/packet-wow.c
+++ b/epan/dissectors/packet-wow.c
@@ -81,6 +81,7 @@ static int proto_wow = -1;
static int hf_wow_command = -1;
static int hf_wow_error = -1;
+static int hf_wow_protocol_version = -1;
static int hf_wow_pkt_size = -1;
static int hf_wow_gamename = -1;
static int hf_wow_version1 = -1;
@@ -179,7 +180,7 @@ dissect_wow_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
case AUTH_LOGON_CHALLENGE :
if(WOW_CLIENT_TO_SERVER) {
- proto_tree_add_item(wow_tree, hf_wow_error, tvb,
+ proto_tree_add_item(wow_tree, hf_wow_protocol_version, tvb,
offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
@@ -246,11 +247,13 @@ dissect_wow_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
} else if(WOW_SERVER_TO_CLIENT) {
- proto_tree_add_item(wow_tree, hf_wow_error, tvb,
+ proto_tree_add_item(wow_tree, hf_wow_protocol_version, tvb,
offset, 1, ENC_LITTLE_ENDIAN);
offset += 1;
- offset += 1; /* Unknown field */
+ proto_tree_add_item(wow_tree, hf_wow_error, tvb,
+ offset, 1, ENC_LITTLE_ENDIAN);
+ offset += 1;
proto_tree_add_item(wow_tree, hf_wow_srp_b, tvb,
offset, 32, ENC_NA);
@@ -424,7 +427,11 @@ proto_register_wow(void)
FT_UINT8, BASE_HEX, VALS(cmd_vs), 0,
"Type of packet", HFILL }
},
-
+ { &hf_wow_protocol_version,
+ { "Protocol version", "wow.protocol_version",
+ FT_UINT8, BASE_DEC, 0, 0,
+ "Version of packet", HFILL }
+ },
{ &hf_wow_error,
{ "Error", "wow.error",
FT_UINT8, BASE_DEC, 0, 0,