TDS7: Make sure to populate pre-login message tree for all tokens
Change-Id: I07bc540efe94ad8f93bd460f4dd23310285fb4e0 Reviewed-on: https://code.wireshark.org/review/38181 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
1b88c72776
commit
952e46fb56
|
@ -4125,7 +4125,10 @@ dissect_tds7_prelogin_packet(tvbuff_t *tvb, proto_tree *tree, tds_conv_info_t *t
|
|||
offset += 1;
|
||||
|
||||
if(token == TDS7_PRELOGIN_OPTION_TERMINATOR)
|
||||
{
|
||||
proto_item_append_text(option_item, ": Terminator");
|
||||
break;
|
||||
}
|
||||
|
||||
tokenoffset = tvb_get_ntohs(tvb, offset);
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_offset, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
|
@ -4135,58 +4138,56 @@ dissect_tds7_prelogin_packet(tvbuff_t *tvb, proto_tree *tree, tds_conv_info_t *t
|
|||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
if(tokenlen != 0)
|
||||
switch(token)
|
||||
{
|
||||
switch(token)
|
||||
{
|
||||
case TDS7_PRELOGIN_OPTION_VERSION: {
|
||||
guint32 version;
|
||||
proto_item_append_text(option_item, ": Version");
|
||||
proto_tree_add_item_ret_uint(option_tree, hf_tds_prelogin_option_version,
|
||||
tvb, tokenoffset, 4, ENC_BIG_ENDIAN,
|
||||
&version);
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_subbuild, tvb, tokenoffset + 4, 2, ENC_LITTLE_ENDIAN);
|
||||
/* This gives us a better idea of what protocol we'll see. */
|
||||
if (is_response) {
|
||||
set_tds_version(tds_info, version);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_ENCRYPTION: {
|
||||
proto_item_append_text(option_item, ": Encryption");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_encryption, tvb, tokenoffset, 1, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_INSTOPT: {
|
||||
proto_item_append_text(option_item, ": InstOpt");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_instopt, tvb, tokenoffset, tokenlen, ENC_ASCII | ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_THREADID: {
|
||||
proto_item_append_text(option_item, ": ThreadID");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_threadid, tvb, tokenoffset, 4, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_MARS: {
|
||||
proto_item_append_text(option_item, ": MARS");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_mars, tvb, tokenoffset, 1, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_TRACEID: {
|
||||
proto_item_append_text(option_item, ": TraceID");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_traceid, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_FEDAUTHREQUIRED: {
|
||||
proto_item_append_text(option_item, ": FedAuthRequired");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_fedauthrequired, tvb, tokenoffset, 1, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_NONCEOPT: {
|
||||
proto_item_append_text(option_item, ": NonceOpt");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_nonceopt, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
case TDS7_PRELOGIN_OPTION_VERSION: {
|
||||
guint32 version;
|
||||
proto_item_append_text(option_item, ": Version");
|
||||
proto_tree_add_item_ret_uint(option_tree, hf_tds_prelogin_option_version,
|
||||
tvb, tokenoffset, 4, ENC_BIG_ENDIAN,
|
||||
&version);
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_subbuild, tvb, tokenoffset + 4, 2, ENC_LITTLE_ENDIAN);
|
||||
/* This gives us a better idea of what protocol we'll see. */
|
||||
if (is_response) {
|
||||
set_tds_version(tds_info, version);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_ENCRYPTION: {
|
||||
proto_item_append_text(option_item, ": Encryption");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_encryption, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_INSTOPT: {
|
||||
proto_item_append_text(option_item, ": InstOpt");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_instopt, tvb, tokenoffset, tokenlen, ENC_ASCII | ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_THREADID: {
|
||||
proto_item_append_text(option_item, ": ThreadID");
|
||||
if (tokenlen > 0)
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_threadid, tvb, tokenoffset, tokenlen, ENC_BIG_ENDIAN);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_MARS: {
|
||||
proto_item_append_text(option_item, ": MARS");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_mars, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_TRACEID: {
|
||||
proto_item_append_text(option_item, ": TraceID");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_traceid, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_FEDAUTHREQUIRED: {
|
||||
proto_item_append_text(option_item, ": FedAuthRequired");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_fedauthrequired, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
case TDS7_PRELOGIN_OPTION_NONCEOPT: {
|
||||
proto_item_append_text(option_item, ": NonceOpt");
|
||||
proto_tree_add_item(option_tree, hf_tds_prelogin_option_nonceopt, tvb, tokenoffset, tokenlen, ENC_NA);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue