[master] 3dd8921 log local proxy connections
Nils Goroll
nils.goroll at uplex.de
Wed Jan 24 10:03:08 UTC 2018
commit 3dd89218ba8b38ad6ce2f445adf844fb246f6bc5
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Wed Jan 24 10:53:33 2018 +0100
log local proxy connections
Previously, we would get PROXY vxids without a Proxy line like:
262253 Begin c sess 0 PROXY
262253 SessOpen c w.x.y.z 1234 a0 a.b.c.d 85 1516787007.682753 32
262253 Link c req 262254 rxreq
diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c
index fbef883..d165281 100644
--- a/bin/varnishd/proxy/cache_proxy_proto.c
+++ b/bin/varnishd/proxy/cache_proxy_proto.c
@@ -193,7 +193,7 @@ vpx_proto2(const struct worker *wrk, struct req *req)
/* Command @12 bottom half */
switch (p[12] & 0x0f) {
case 0x0:
- /* Local connection from proxy, ignore addresses */
+ VSL(SLT_Proxy, req->sp->vxid, "2 local local local local");
return (0);
case 0x1:
/* Proxied connection */
diff --git a/include/tbl/vsl_tags.h b/include/tbl/vsl_tags.h
index 6463636..f7fa3d5 100644
--- a/include/tbl/vsl_tags.h
+++ b/include/tbl/vsl_tags.h
@@ -140,6 +140,8 @@ SLTM(Proxy, 0, "PROXY protocol information",
"\t| | +------- client port\n"
"\t| +---------- client ip\n"
"\t+------------- PROXY protocol version\n"
+ "\t\n"
+ "\tAll fields are \"local\" for PROXY local connections (command 0x0)\n"
"\n"
)
More information about the varnish-commit
mailing list