[master] 5c23234 Update panic output for the session client address when it's a UDS.
Geoff Simmons
geoff at uplex.de
Thu Feb 22 09:23:10 UTC 2018
commit 5c23234b1fca450a15d84894e7ffab3237bc1307
Author: Geoff Simmons <geoff at uplex.de>
Date: Sun Feb 18 16:41:34 2018 +0100
Update panic output for the session client address when it's a UDS.
diff --git a/bin/varnishd/cache/cache_panic.c b/bin/varnishd/cache/cache_panic.c
index 90050ac..4c194bb 100644
--- a/bin/varnishd/cache/cache_panic.c
+++ b/bin/varnishd/cache/cache_panic.c
@@ -519,7 +519,11 @@ pan_sess(struct vsb *vsb, const struct sess *sp)
VSB_printf(vsb, "\n");
ci = SES_Get_String_Attr(sp, SA_CLIENT_IP);
cp = SES_Get_String_Attr(sp, SA_CLIENT_PORT);
- VSB_printf(vsb, "client = %s %s,\n", ci, cp);
+ if (VALID_OBJ(sp->listen_sock, LISTEN_SOCK_MAGIC))
+ VSB_printf(vsb, "client = %s %s %s,\n", ci, cp,
+ sp->listen_sock->endpoint);
+ else
+ VSB_printf(vsb, "client = %s %s <unknown>\n", ci, cp);
VSB_indent(vsb, -2);
VSB_printf(vsb, "},\n");
More information about the varnish-commit
mailing list