1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

MDEV-13641 host errors are not reset after successful connection.

Fixed thd_set_peer_addr() to propagate host error count from
ip_to_hostname() to check_connection(), which tests this count to clear
errors affter successful authentication.
This commit is contained in:
Vladislav Vaintroub
2017-08-25 16:14:03 +00:00
parent 77c41fa725
commit 578b2b05b8
3 changed files with 37 additions and 7 deletions

View File

@@ -882,8 +882,10 @@ static handle_proxy_header_result handle_proxy_header(NET *net)
/* proxy header indicates LOCAL connection, no action necessary */
return RETRY;
/* Change peer address in THD and ACL structures.*/
uint host_errors;
return (handle_proxy_header_result)thd_set_peer_addr(thd,
&(peer_info.peer_addr), NULL, peer_info.port, false);
&(peer_info.peer_addr), NULL, peer_info.port,
false, &host_errors);
#endif
}