summaryrefslogtreecommitdiff
path: root/sql/sys_vars.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/sys_vars.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/sys_vars.cc')
-rw-r--r--sql/sys_vars.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index e23f151fd8b..4bfda559d53 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -4121,6 +4121,17 @@ static Sys_var_charptr Sys_license(
READ_ONLY GLOBAL_VAR(license), NO_CMD_LINE, IN_SYSTEM_CHARSET,
DEFAULT(STRINGIFY_ARG(LICENSE)));
+char *my_proxy_protocol_networks;
+static Sys_var_charptr Sys_proxy_protocol_networks(
+ "proxy_protocol_networks", "Enable proxy protocol for these source "
+ "networks. The syntax is a comma separated list of IPv4 and IPv6 "
+ "networks. If the network doesn't contain mask, it is considered to be "
+ "a single host. \"*\" represents all networks and must the only "
+ "directive on the line. String \"localhost\" represents non-TCP "
+ "local connections (Unix domain socket, Windows named pipe or shared memory).",
+ READ_ONLY GLOBAL_VAR(my_proxy_protocol_networks),
+ CMD_LINE(REQUIRED_ARG), IN_FS_CHARSET, DEFAULT(""));
+
static bool check_log_path(sys_var *self, THD *thd, set_var *var)
{
if (!var->value)