aboutsummaryrefslogtreecommitdiff
path: root/utils.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-23 21:03:29 +0000
committerOmar Polo <op@omarpolo.com>2023-06-23 21:03:29 +0000
commit509d0509a50883a6f8407b63774f40dd1e41dadf (patch)
treeea2389673345057be53bccbcf653fb0435d77259 /utils.c
parent37df23d183de23b74f8a026977b8210dc22701a6 (diff)
implement `listen on'
Listening by default on all the addresses is so bad I don't know why I haven't changed this before. Anyway. Add a `listen on $hostname port $port' syntax to the config file and deprecate the old "port" and "ipv6" global setting. Still try to honour them when no "listen on" directive is used for backward compatibily, but this will go away in the next next version hopefully. At the moment the `listen on' in server context don't filter the host, i.e. one can still reach a host from a address not specified in the corresponding `liste on', this will be added later.
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index 43c1f4d..bf28329 100644
--- a/utils.c
+++ b/utils.c
@@ -346,6 +346,7 @@ new_vhost(void)
struct vhost *h;
h = xcalloc(1, sizeof(*h));
+ TAILQ_INIT(&h->addrs);
TAILQ_INIT(&h->locations);
TAILQ_INIT(&h->params);
TAILQ_INIT(&h->aliases);