MySQL: verify connection state before dissecting as greeting/login.
Change-Id: I419fad047c91ff1d8544eb3458534c132ec23821 Bug: 12791 Reviewed-on: https://code.wireshark.org/review/17368 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
c31527d406
commit
bb46efdca9
|
@ -2312,7 +2312,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
|
|||
is_ssl = proto_is_frame_protocol(pinfo->layers, "ssl");
|
||||
|
||||
if (is_response) {
|
||||
if (packet_number == 0 ) {
|
||||
if (packet_number == 0 && mysql_frame_data_p->state == UNDEFINED) {
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Server Greeting");
|
||||
offset = mysql_dissect_greeting(tvb, pinfo, offset, mysql_tree, conn_data);
|
||||
} else {
|
||||
|
@ -2320,7 +2320,7 @@ dissect_mysql_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
|
|||
offset = mysql_dissect_response(tvb, pinfo, offset, mysql_tree, conn_data);
|
||||
}
|
||||
} else {
|
||||
if (packet_number == 1 || (packet_number == 2 && is_ssl)) {
|
||||
if (mysql_frame_data_p->state == LOGIN && (packet_number == 1 || (packet_number == 2 && is_ssl))) {
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Login Request");
|
||||
offset = mysql_dissect_login(tvb, pinfo, offset, mysql_tree, conn_data);
|
||||
if (conn_data->srv_caps & MYSQL_CAPS_CP) {
|
||||
|
|
Loading…
Reference in New Issue