Re-enable some TLS-related options for non-DoH builds

This commit fixes a regression introduced at
ea80bcc41c. Some options, which are
common to both DoH and DoT were mistakenly disabled for non-DoH
builds. That is a mistake, because DoH does not imply DoT and vice
versa. Not fixing this would make DoT functionality not accessible
without DoH.
This commit is contained in:
Artem Boldariev 2021-09-01 10:38:01 +03:00
parent 352ecc51c7
commit c0906dd491

View file

@ -161,11 +161,10 @@ static cfg_type_t cfg_type_tkey_dhkey = { "tkey-dhkey", cfg_parse_tuple,
static cfg_tuplefielddef_t listenon_tuple_fields[] = {
{ "port", &cfg_type_optional_port, 0 },
{ "dscp", &cfg_type_uint32, 0 },
#if HAVE_LIBNGHTTP2
{ "tls", &cfg_type_astring, 0 },
#if HAVE_LIBNGHTTP2
{ "http", &cfg_type_astring, 0 },
#else
{ "tls", &cfg_type_astring, CFG_CLAUSEFLAG_NOTCONFIGURED },
{ "http", &cfg_type_astring, CFG_CLAUSEFLAG_NOTCONFIGURED },
#endif
{ NULL, NULL, 0 }
@ -219,11 +218,7 @@ static cfg_type_t cfg_type_remoteservers = { "remote-servers", cfg_parse_tuple,
static cfg_tuplefielddef_t namesockaddrkey_fields[] = {
{ "remoteselement", &cfg_type_remoteselement, 0 },
{ "key", &cfg_type_optional_keyref, 0 },
#if HAVE_LIBNGHTTP2
{ "tls", &cfg_type_optional_tls, 0 },
#else
{ "tls", &cfg_type_optional_tls, CFG_CLAUSEFLAG_NOTCONFIGURED },
#endif
{ NULL, NULL, 0 },
};
@ -1132,12 +1127,7 @@ static cfg_clausedef_t namedconf_clauses[] = {
{ "primaries", &cfg_type_remoteservers, CFG_CLAUSEFLAG_MULTI },
{ "statistics-channels", &cfg_type_statschannels,
CFG_CLAUSEFLAG_MULTI },
#if HAVE_LIBNGHTTP2
{ "tls", &cfg_type_tlsconf, CFG_CLAUSEFLAG_MULTI },
#else
{ "tls", &cfg_type_tlsconf,
CFG_CLAUSEFLAG_MULTI | CFG_CLAUSEFLAG_NOTCONFIGURED },
#endif
{ "view", &cfg_type_view, CFG_CLAUSEFLAG_MULTI },
{ NULL, NULL, 0 }
};