diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-22 21:08:38 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-08-22 21:08:38 +0200 |
commit | 58cd69fc808cade5ec3183a56b9d16957f0da02c (patch) | |
tree | 4ba0d41e6ad569efa3826162ac3505b103c90dc4 /sql/mysqld.cc | |
parent | d258a2bd1f8548bafc155d0ac1ed06c236d3fca2 (diff) | |
download | mariadb-git-58cd69fc808cade5ec3183a56b9d16957f0da02c.tar.gz |
MDEV-11159 Server proxy protocol support
accept proxy protocol header from client connections.
The new server variable 'proxy_protocol_networks' contains list
of networks from which proxy header is accepted.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index dad15c98920..01f754955b6 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -75,6 +75,7 @@ #include "wsrep_var.h" #include "wsrep_thd.h" #include "wsrep_sst.h" +#include "proxy_protocol.h" #include "sql_callback.h" #include "threadpool.h" @@ -2286,6 +2287,7 @@ void clean_up(bool print_message) my_free(const_cast<char*>(relay_log_index)); #endif free_list(opt_plugin_load_list_ptr); + cleanup_proxy_protocol_networks(); /* The following lines may never be executed as the main thread may have @@ -2682,6 +2684,9 @@ static void network_init(void) if (MYSQL_CALLBACK_ELSE(thread_scheduler, init, (), 0)) unireg_abort(1); /* purecov: inspected */ + if (set_proxy_protocol_networks(my_proxy_protocol_networks)) + unireg_abort(1); + set_ports(); if (report_port == 0) |