aboutsummaryrefslogtreecommitdiff
path: root/fcgi.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 /fcgi.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 'fcgi.c')
-rw-r--r--fcgi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgi.c b/fcgi.c
index bf3cae0..1d55b4a 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -350,7 +350,7 @@ fcgi_req(struct client *c)
struct tm tminfo;
struct envlist *p;
- e = getnameinfo((struct sockaddr*)&c->addr, sizeof(c->addr),
+ e = getnameinfo((struct sockaddr*)&c->raddr, c->raddrlen,
addr, sizeof(addr),
NULL, 0,
NI_NUMERICHOST);