aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_proxy_protocol.h
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2019-10-21 18:06:19 +0300
committerRoman Arutyunyan <arut@nginx.com>2019-10-21 18:06:19 +0300
commitbe932e81a1531a3ba032febad968fc2006c4fa48 (patch)
tree582aff75a1bd2b436983740e6dfc76288047e31e /src/core/ngx_proxy_protocol.h
parent0098761cb8636a6def144445082a0c90d340321c (diff)
downloadnginx-be932e81a1531a3ba032febad968fc2006c4fa48.tar.gz
nginx-be932e81a1531a3ba032febad968fc2006c4fa48.zip
Core: moved PROXY protocol fields out of ngx_connection_t.
Now a new structure ngx_proxy_protocol_t holds these fields. This allows to add more PROXY protocol fields in the future without modifying the connection structure.
Diffstat (limited to 'src/core/ngx_proxy_protocol.h')
-rw-r--r--src/core/ngx_proxy_protocol.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/ngx_proxy_protocol.h b/src/core/ngx_proxy_protocol.h
index fb848f683..713f5c799 100644
--- a/src/core/ngx_proxy_protocol.h
+++ b/src/core/ngx_proxy_protocol.h
@@ -16,6 +16,12 @@
#define NGX_PROXY_PROTOCOL_MAX_HEADER 107
+struct ngx_proxy_protocol_s {
+ ngx_str_t src_addr;
+ in_port_t src_port;
+};
+
+
u_char *ngx_proxy_protocol_read(ngx_connection_t *c, u_char *buf,
u_char *last);
u_char *ngx_proxy_protocol_write(ngx_connection_t *c, u_char *buf,