diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-12-18 10:10:12 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2014-12-18 10:10:12 +0000 |
commit | 2bb22040068586a7eb8d93d5645cd9567003cc70 (patch) | |
tree | 20d4960daf9e36b6703c61a02c419488472f4e8e /usr.sbin/httpd/parse.y | |
parent | c2d7a0f87762803427937bfa46d45104a4f321f2 (diff) |
Accept * as an alias for the default ipv4 listen address.
OK jsg@
Diffstat (limited to 'usr.sbin/httpd/parse.y')
-rw-r--r-- | usr.sbin/httpd/parse.y | 7 |
1 files changed, 5 insertions, 2 deletions
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 <reyk@openbsd.org> @@ -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? */ |