Backend failed handshake is now a detected
Backend failed handshake is now a detected and MYSQL_HANDSHAKE_FAILED s set. Reload users from backend is now restricted to MYSQL_AUTH_FAILED only
This commit is contained in:
@ -214,12 +214,12 @@ int gw_read_backend_handshake(
|
||||
|
||||
if (h_len <= 4) {
|
||||
/* log error this exit point */
|
||||
conn->protocol_auth_state = MYSQL_AUTH_FAILED;
|
||||
conn->protocol_auth_state = MYSQL_HANDSHAKE_FAILED;
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_handshake] after "
|
||||
"dcb_read, fd %d, "
|
||||
"state = MYSQL_AUTH_FAILED.",
|
||||
"state = MYSQL_HANDSHAKE_FAILED.",
|
||||
dcb->fd,
|
||||
pthread_self())));
|
||||
|
||||
@ -232,6 +232,8 @@ int gw_read_backend_handshake(
|
||||
uint16_t errcode = MYSQL_GET_ERRCODE(payload);
|
||||
char* bufstr = strndup(&((char *)payload)[7], len-3);
|
||||
|
||||
conn->protocol_auth_state = MYSQL_HANDSHAKE_FAILED;
|
||||
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_receive_backend_auth] Invalid "
|
||||
@ -261,12 +263,14 @@ int gw_read_backend_handshake(
|
||||
* data in buffer less than expected in the
|
||||
* packet. Log error this exit point
|
||||
*/
|
||||
conn->protocol_auth_state = MYSQL_AUTH_FAILED;
|
||||
|
||||
conn->protocol_auth_state = MYSQL_HANDSHAKE_FAILED;
|
||||
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_handshake] after "
|
||||
"gw_mysql_get_byte3, fd %d, "
|
||||
"state = MYSQL_AUTH_FAILED.",
|
||||
"state = MYSQL_HANDSHAKE_FAILED.",
|
||||
pthread_self(),
|
||||
dcb->fd,
|
||||
pthread_self())));
|
||||
@ -285,12 +289,13 @@ int gw_read_backend_handshake(
|
||||
* we cannot continue
|
||||
* log error this exit point
|
||||
*/
|
||||
conn->protocol_auth_state = MYSQL_AUTH_FAILED;
|
||||
conn->protocol_auth_state = MYSQL_HANDSHAKE_FAILED;
|
||||
|
||||
LOGIF(LD, (skygw_log_write(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [gw_read_backend_handshake] after "
|
||||
"gw_decode_mysql_server_handshake, fd %d, "
|
||||
"state = MYSQL_AUTH_FAILED.",
|
||||
"state = MYSQL_HANDSHAKE_FAILED.",
|
||||
pthread_self(),
|
||||
conn->owner_dcb->fd,
|
||||
pthread_self())));
|
||||
|
Reference in New Issue
Block a user