From: reyk Date: Thu, 18 Dec 2014 10:10:11 +0000 (+0000) Subject: Accept * as an alias for the default ipv4 listen address. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e33b51926f653cf598b6fa3ccea95050c1a09b13;p=openbsd Accept * as an alias for the default ipv4 listen address. OK jsg@ --- diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 849d35088d0..84b70c86993 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.44 2014/12/12 14:45:59 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.45 2014/12/18 10:10:11 reyk Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter @@ -1123,7 +1123,7 @@ nodigits: x != '!' && x != '=' && x != '#' && \ x != ',' && x != ';' && x != '/')) - if (isalnum(c) || c == ':' || c == '_') { + if (isalnum(c) || c == ':' || c == '_' || c == '*') { do { *p++ = c; if ((unsigned)(p-buf) >= sizeof(buf)) { @@ -1605,6 +1605,9 @@ host(const char *s, struct addresslist *al, int max, { struct address *h; + if (strcmp("*", s) == 0) + s = "0.0.0.0"; + h = host_v4(s); /* IPv6 address? */