[config] inherit server.use-ipv6 and server.set-v6only (fixes #678)

inherit server.use-ipv6 and server.set-v6only from global scope
into $SERVER["socket"] blocks

(This potential behavior change was announced with lighttpd 1.4.40)

x-ref:
  "$SERVER["socket"] to bind to IPv6 by default"
  https://redmine.lighttpd.net/issues/678
personal/stbuehler/mod-csrf-old
Glenn Strauss 2016-07-16 16:15:19 -04:00
parent e9c9f42564
commit 2cdc017fb9
1 changed files with 2 additions and 2 deletions

View File

@ -200,8 +200,8 @@ static int config_insert(server *srv) {
s->ssl_empty_fragments = 0;
s->ssl_use_sslv2 = 0;
s->ssl_use_sslv3 = 0;
s->use_ipv6 = 0;
s->set_v6only = 1;
s->use_ipv6 = (i == 0) ? 0 : srv->config_storage[0]->use_ipv6;
s->set_v6only = (i == 0) ? 1 : srv->config_storage[0]->set_v6only;
s->defer_accept = (i == 0) ? 0 : srv->config_storage[0]->defer_accept;
#ifdef HAVE_LSTAT
s->follow_symlink = 1;