diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2014-09-05 08:59:10 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-09-05 22:57:45 +0000 |
commit | 914169f97e834397bdb058e5a044156fb7c1eab4 (patch) | |
tree | dbb0d5d4c3e51eb28b035ff53727688a44029253 /epan/dissectors/packet-mysql.c | |
parent | b515cd3aec86f529643293995097f5a38468efa3 (diff) |
MySQL: add decode connattrs when use COM_CHANGE_USER
Change-Id: I5c24f0bf3d756abed0db17bf2ae8ab0dbf695c43
Ping-Bug:10351
Reviewed-on: https://code.wireshark.org/review/4000
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-mysql.c')
-rw-r--r-- | epan/dissectors/packet-mysql.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c index d5faef9658..86d9f3d777 100644 --- a/epan/dissectors/packet-mysql.c +++ b/epan/dissectors/packet-mysql.c @@ -1291,6 +1291,34 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset, offset += 2; /* for charset */ } + /* optional: authentication plugin */ + if (conn_data->clnt_caps_ext & MYSQL_CAPS_PA) + { + lenstr= my_tvb_strsize(tvb,offset); + proto_tree_add_item(req_tree, hf_mysql_client_auth_plugin, tvb, offset, lenstr, ENC_ASCII|ENC_NA); + offset += lenstr; + } + + /* optional: connection attributes */ + if (conn_data->clnt_caps_ext & MYSQL_CAPS_CA) + { + proto_tree *connattrs_tree; + int lenfle; + guint64 connattrs_length; + int length; + + lenfle = tvb_get_fle(tvb, offset, &connattrs_length, NULL); + tf = proto_tree_add_item(req_tree, hf_mysql_connattrs, tvb, offset, (guint32)connattrs_length, ENC_ASCII|ENC_NA); + connattrs_tree = proto_item_add_subtree(tf, ett_connattrs); + proto_tree_add_uint64(connattrs_tree, hf_mysql_connattrs_length, tvb, offset, lenfle, connattrs_length); + offset += lenfle; + + while (connattrs_length > 0) { + length = add_connattrs_entry_to_tree(tvb, pinfo, connattrs_tree, offset); + offset += length; + connattrs_length -= length; + } + } conn_data->state= RESPONSE_OK; break; |