--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+tls local-tls {
+ key-file "key.pem";
+ cert-file "cert.pem";
+};
+
+http local-http-server {
+ endpoints { "/dns-query"; };
+ listener-clients 100;
+ streams-per-connection 100;
+};
+
+# duplicated HTTP configuration
+http local-http-server {
+ endpoints { "/dns-query"; };
+ listener-clients 100;
+ streams-per-connection 100;
+};
+
+options {
+ listen-on { 10.53.0.1; };
+ http-port 80;
+ https-port 443;
+ http-listener-clients 100;
+ http-streams-per-connection 100;
+ listen-on port 443 tls local-tls http local-http-server { 10.53.0.1; };
+ listen-on port 8080 tls none http local-http-server { 10.53.0.1; };
+};
#if HAVE_LIBNGHTTP2
static isc_result_t
bind9_check_httpserver(const cfg_obj_t *http, isc_log_t *logctx,
- isc_symtab_t *symtab, isc_mem_t *mctx) {
+ isc_symtab_t *symtab) {
isc_result_t result, tresult;
const char *name = cfg_obj_asstring(cfg_map_getname(http));
- char *tmp = isc_mem_strdup(mctx, name);
const cfg_obj_t *eps = NULL;
const cfg_listelt_t *elt = NULL;
isc_symvalue_t symvalue;
/* Check for duplicates */
symvalue.as_cpointer = http;
- result = isc_symtab_define(symtab, tmp, 1, symvalue,
+ result = isc_symtab_define(symtab, name, 1, symvalue,
isc_symexists_reject);
if (result == ISC_R_EXISTS) {
const char *file = NULL;
unsigned int line;
- tresult = isc_symtab_lookup(symtab, tmp, 1, &symvalue);
+ tresult = isc_symtab_lookup(symtab, name, 1, &symvalue);
RUNTIME_CHECK(tresult == ISC_R_SUCCESS);
line = cfg_obj_line(symvalue.as_cpointer);
"also defined at %s:%u",
name, file, line);
}
- isc_mem_free(mctx, tmp);
/* Check endpoints are valid */
tresult = cfg_map_get(http, "endpoints", &eps);
for (elt = cfg_list_first(obj); elt != NULL; elt = cfg_list_next(elt)) {
obj = cfg_listelt_value(elt);
- tresult = bind9_check_httpserver(obj, logctx, symtab, mctx);
+ tresult = bind9_check_httpserver(obj, logctx, symtab);
if (result == ISC_R_SUCCESS) {
result = tresult;
}