summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-08-15 15:40:09 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-08-22 16:48:46 +0000
commit41988245ca6e882bbfb1754200500d61e51e93c5 (patch)
tree4ede696cae3552d65783f064ff9bc9fc59234bdf /sql/mysqld.cc
parent7fee164faf8fce7be4ebe322d2178efd3d075eae (diff)
downloadmariadb-git-bb-10.3-proxy-protocol.tar.gz
MDEV-11159 Server proxy protocol supportbb-10.3-proxy-protocol
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.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index c66f1c45c43..6bb308351a1 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"
@@ -2285,6 +2286,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
@@ -2681,6 +2683,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)