Commit 344089f6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a parse bug in IPv6 addresses.

Fixes: #832

Patch by: bz (THANKS!)


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5705 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent cbdb59a6
# $Id
test "Regression #832 IPV6 parse bug"
varnish v1 -vcl {
backend default {
.host = "[::]";
}
}
......@@ -132,10 +132,10 @@ Emit_Sockaddr(struct vcc *tl, const struct token *t_host, const char *port)
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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment