summaryrefslogtreecommitdiffhomepage
path: root/src/conf.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-11-06 23:25:56 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2021-06-10 22:07:59 +0200
commit2abda4c7643797bf148fb267da8cbe4032d9b659 (patch)
treeecd6cb95cd1b5c4b3929a2dfcddf09c1b04a4131 /src/conf.c
parent7168a42624fb9ce3305c9e666e44cc8a533af5f6 (diff)
WIP: BindIPv4Mapped
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conf.c b/src/conf.c
index 1a78816..7a23245 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -117,6 +117,7 @@ static HANDLE_FUNC (handle_allow);
static HANDLE_FUNC (handle_basicauth);
static HANDLE_FUNC (handle_anonymous);
static HANDLE_FUNC (handle_bind);
+static HANDLE_FUNC (handle_bindipv4mapped);
static HANDLE_FUNC (handle_bindsame);
static HANDLE_FUNC (handle_connectport);
static HANDLE_FUNC (handle_defaulterrorfile);
@@ -216,6 +217,7 @@ struct {
STDCONF (deny, "(" "(" IPMASK "|" IPV6MASK ")" "|" ALNUM ")",
handle_deny),
STDCONF (bind, "(" IP "|" IPV6 ")", handle_bind),
+ STDCONF (bindipv4mapped, "(" IPV6 ")", handle_bindipv4mapped),
/* other */
STDCONF (basicauth, ALNUM WS ALNUM, handle_basicauth),
STDCONF (errorfile, INT WS STR, handle_errorfile),
@@ -289,6 +291,7 @@ void free_config (struct config_s *conf)
safefree (conf->stathost);
safefree (conf->user);
safefree (conf->group);
+ safefree (conf->bind_ipv4mapped);
stringlist_free(conf->basicauth_list);
stringlist_free(conf->listen_addrs);
stringlist_free(conf->bind_addrs);
@@ -845,6 +848,11 @@ static HANDLE_FUNC (handle_listen)
return 0;
}
+static HANDLE_FUNC (handle_bindipv4mapped)
+{
+ return set_string_arg(&conf->bind_ipv4mapped, line, &match[2]);
+}
+
static HANDLE_FUNC (handle_errorfile)
{
/*