You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2016/12/26 20:03:29 UTC
svn commit: r1776070 - in /httpd/httpd/trunk:
docs/manual/mod/mod_proxy_protocol.xml modules/filters/mod_proxy_protocol.c
Author: jim
Date: Mon Dec 26 20:03:29 2016
New Revision: 1776070
URL: http://svn.apache.org/viewvc?rev=1776070&view=rev
Log:
for the time being, rename as ProxyProtocolFilter to avoid
mod_ssl conflict
Modified:
httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml
httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c
Modified: httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml?rev=1776070&r1=1776069&r2=1776070&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_proxy_protocol.xml Mon Dec 26 20:03:29 2016
@@ -3,7 +3,7 @@
<?xml-stylesheet type="text/xsl" href="http://httpd.apache.org/docs/2.4/style/manual.en.xsl"?>
<!--
- Copyright 2014 Cloudzilla Inc.
+ Orig Copyright 2014 Cloudzilla Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -52,14 +52,14 @@
<seealso><a href="http://www.haproxy.org/download/1.5/doc/proxy-protocol.txt">Proxy Protocol Spec</a></seealso>
<directivesynopsis>
-<name>ProxyProtocol</name>
+<name>ProxyProtocolFilter </name>
<description>Enable or disable the proxy protocol handling</description>
-<syntax>ProxyProtocol On|Off</syntax>
+<syntax>ProxyProtocolFilter On|Off</syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage>
- <p>The <directive>ProxyProtocol</directive> enables or disables the
+ <p>The <directive>ProxyProtocolFilter</directive> enables or disables the
reading and handling of the proxy protocol connection header. If enabled
the upstream client <em>must</em> send the header every time it opens a
connection or the connection will get aborted.</p>
@@ -75,7 +75,7 @@
notice will be logged indicating which setting was being overridden.</p>
<highlight language="config">
- ProxyProtocol On
+ ProxyProtocolFilter On
</highlight>
</usage>
</directivesynopsis>
Modified: httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c?rev=1776070&r1=1776069&r2=1776070&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_proxy_protocol.c Mon Dec 26 20:03:29 2016
@@ -128,7 +128,7 @@ static void pp_warn_enable_conflict(pp_a
apr_sockaddr_ip_getbuf(buf, sizeof(buf), prev->addr);
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, new,
- "ProxyProtocol: previous setting for %s:%hu from virtual "
+ "ProxyProtocolFilter: previous setting for %s:%hu from virtual "
"host {%s:%hu in %s} is being overriden by virtual host "
"{%s:%hu in %s}; new setting is '%s'",
buf, prev->addr->port, prev->source->server_hostname,
@@ -202,19 +202,19 @@ static int pp_hook_post_config(apr_pool_
for (info = conf->enabled; info; info = info->next) {
apr_sockaddr_ip_getbuf(buf, sizeof(buf), info->addr);
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
- "ProxyProtocol: enabled on %s:%hu", buf, info->addr->port);
+ "ProxyProtocolFilter: enabled on %s:%hu", buf, info->addr->port);
}
for (info = conf->disabled; info; info = info->next) {
apr_sockaddr_ip_getbuf(buf, sizeof(buf), info->addr);
ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
- "ProxyProtocol: disabled on %s:%hu", buf, info->addr->port);
+ "ProxyProtocolFilter: disabled on %s:%hu", buf, info->addr->port);
}
return OK;
}
static const command_rec proxy_protocol_cmds[] = {
- AP_INIT_FLAG("ProxyProtocol", pp_enable_proxy_protocol, NULL, RSRC_CONF,
+ AP_INIT_FLAG("ProxyProtocolFilter", pp_enable_proxy_protocol, NULL, RSRC_CONF,
"Enable proxy-protocol handling (`on', `off')"),
{ NULL }
};
@@ -321,7 +321,7 @@ static int pp_hook_pre_connection(conn_r
}
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
- "ProxyProtocol: enabled on connection to %s:%hu",
+ "ProxyProtocolFilter: enabled on connection to %s:%hu",
c->local_ip, c->local_addr->port);
/* this holds the resolved proxy info for this connection */
@@ -370,7 +370,7 @@ static pp_parse_status_t pp_process_v1_h
word = apr_strtok(NULL, " ", &saveptr); \
if (!word) { \
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, \
- "ProxyProtocol: no " field " found in header '%s'", \
+ "ProxyProtocolFilter: no " field " found in header '%s'", \
hdr->v1.line); \
return HDR_ERROR; \
}
@@ -405,7 +405,7 @@ static pp_parse_status_t pp_process_v1_h
}
else {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
- "ProxyProtocol: unknown family '%s' in header '%s'",
+ "ProxyProtocolFilter: unknown family '%s' in header '%s'",
word, hdr->v1.line);
return HDR_ERROR;
}
@@ -415,7 +415,7 @@ static pp_parse_status_t pp_process_v1_h
if (strspn(word, valid_addr_chars) != strlen(word)) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
- "ProxyProtocol: invalid client-address '%s' found in "
+ "ProxyProtocolFilter: invalid client-address '%s' found in "
"header '%s'", word, hdr->v1.line);
return HDR_ERROR;
}
@@ -429,7 +429,7 @@ static pp_parse_status_t pp_process_v1_h
GET_NEXT_WORD("client-port")
if (sscanf(word, "%hu", &port) != 1) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
- "ProxyProtocol: error parsing port '%s' in header '%s'",
+ "ProxyProtocolFilter: error parsing port '%s' in header '%s'",
word, hdr->v1.line);
return HDR_ERROR;
}
@@ -443,7 +443,7 @@ static pp_parse_status_t pp_process_v1_h
if (ret != APR_SUCCESS) {
conn_conf->client_addr = NULL;
ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, c,
- "ProxyProtocol: error converting family '%d', host '%s',"
+ "ProxyProtocolFilter: error converting family '%d', host '%s',"
" and port '%hu' to sockaddr; header was '%s'",
family, host, port, hdr->v1.line);
return HDR_ERROR;
@@ -483,7 +483,7 @@ static pp_parse_status_t pp_process_v2_h
if (ret != APR_SUCCESS) {
conn_conf->client_addr = NULL;
ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, c,
- "ProxyProtocol: error creating sockaddr");
+ "ProxyProtocolFilter: error creating sockaddr");
return HDR_ERROR;
}
@@ -499,7 +499,7 @@ static pp_parse_status_t pp_process_v2_h
if (ret != APR_SUCCESS) {
conn_conf->client_addr = NULL;
ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, c,
- "ProxyProtocol: error creating sockaddr");
+ "ProxyProtocolFilter: error creating sockaddr");
return HDR_ERROR;
}
@@ -520,7 +520,7 @@ static pp_parse_status_t pp_process_v2_h
default:
/* not a supported command */
ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, c,
- "ProxyProtocol: unsupported command %.2hx",
+ "ProxyProtocolFilter: unsupported command %.2hx",
hdr->v2.ver_cmd);
return HDR_ERROR;
}
@@ -530,7 +530,7 @@ static pp_parse_status_t pp_process_v2_h
if (ret != APR_SUCCESS) {
conn_conf->client_addr = NULL;
ap_log_cerror(APLOG_MARK, APLOG_ERR, ret, c,
- "ProxyProtocol: error converting address to string");
+ "ProxyProtocolFilter: error converting address to string");
return HDR_ERROR;
}
@@ -554,7 +554,7 @@ static int pp_determine_version(conn_rec
}
else {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
- "ProxyProtocol: no valid header found");
+ "ProxyProtocolFilter: no valid header found");
return -1;
}
}
@@ -664,7 +664,7 @@ static apr_status_t pp_input_filter(ap_f
}
else {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
- "ProxyProtocol: internal error: unknown version "
+ "ProxyProtocolFilter: internal error: unknown version "
"%d", ctx->version);
f->c->aborted = 1;
apr_brigade_destroy(ctx->bb);
@@ -689,12 +689,12 @@ static apr_status_t pp_input_filter(ap_f
/* we only get here when done == 1 */
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c,
- "ProxyProtocol: received valid header: %s:%hu",
+ "ProxyProtocolFilter: received valid header: %s:%hu",
conn_conf->client_ip, conn_conf->client_addr->port);
if (ctx->rcvd > ctx->need || !APR_BRIGADE_EMPTY(ctx->bb)) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
- "ProxyProtocol: internal error: have data left over; "
+ "ProxyProtocolFilter: internal error: have data left over; "
" need=%lu, rcvd=%lu, brigade-empty=%d", ctx->need,
ctx->rcvd, APR_BRIGADE_EMPTY(ctx->bb));
f->c->aborted = 1;