Attached.

On Wed, Nov 4, 2015 at 10:46 AM, Poul-Henning Kamp <[email protected]>
wrote:

> --------
> In message <
> cajv_h0zy3e4t5704qohqbnqxjgxnh1hdgmneybubfxn1jhw...@mail.gmail.com>
> , Federico Schwindt writes:
>
> >Any comments?
>
> Sounds sensible, send patch.
>
> >> My proposal
> >> -----------------
> >>
> >> Change 3 as follows:
> >>
> >> 3. If the string doesn't have a space, but has a single ":" take
> >> everything up to the ":" (but excluding it) as a host, and anything
> >> after as the port.  If the string has 2 or more ":", take the whole
> >> string as a host without port.
>
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> [email protected]         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
>
diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c
index 6d1b809..3d40473 100644
--- a/lib/libvarnish/vss.c
+++ b/lib/libvarnish/vss.c
@@ -56,6 +56,7 @@
  * "0.0.0.0" - "0.0.0.0:80"
  * "[::1]" - "[::1]:80"
  * "[::]" - "[::]:80"
+ * "::1"
  *
  * See also RFC5952
  */
@@ -86,6 +87,8 @@ vss_parse(char *str, char **addr, char **port)
 			p = strchr(str, ':');
 		if (p == NULL)
 			return (NULL);
+		if (p[0] == ':' && strchr(&p[1], ':'))
+			return (NULL);
 		if (p == str)
 			*addr = NULL;
 	}
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to