r5705 - in trunk/varnish-cache: bin/varnishtest/tests lib/libvcl
phk at varnish-cache.org
phk at varnish-cache.org
Mon Jan 10 13:09:19 CET 2011
Author: phk
Date: 2011-01-10 13:09:18 +0100 (Mon, 10 Jan 2011)
New Revision: 5705
Added:
trunk/varnish-cache/bin/varnishtest/tests/r00832.vtc
Modified:
trunk/varnish-cache/lib/libvcl/vcc_backend.c
Log:
Fix a parse bug in IPv6 addresses.
Fixes: #832
Patch by: bz (THANKS!)
Added: trunk/varnish-cache/bin/varnishtest/tests/r00832.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/r00832.vtc (rev 0)
+++ trunk/varnish-cache/bin/varnishtest/tests/r00832.vtc 2011-01-10 12:09:18 UTC (rev 5705)
@@ -0,0 +1,9 @@
+# $Id
+
+test "Regression #832 IPV6 parse bug"
+
+varnish v1 -vcl {
+ backend default {
+ .host = "[::]";
+ }
+}
Modified: trunk/varnish-cache/lib/libvcl/vcc_backend.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_backend.c 2011-01-10 11:33:13 UTC (rev 5704)
+++ trunk/varnish-cache/lib/libvcl/vcc_backend.c 2011-01-10 12:09:18 UTC (rev 5705)
@@ -132,10 +132,10 @@
vcc_ErrWhere(tl, t_host);
return;
}
- if (pop != NULL)
- error = getaddrinfo(hop, pop, &hint, &res0);
- else
- error = getaddrinfo(t_host->dec, port, &hint, &res0);
+ error = getaddrinfo(
+ hop != NULL ? hop : t_host->dec,
+ pop != NULL ? pop : port,
+ &hint, &res0);
free(hop);
free(pop);
if (error) {
More information about the varnish-commit
mailing list