conf->mctx = mctx;
ISC_LIST_INIT(conf->nameservers);
+ ISC_LIST_INIT(conf->searchlist);
conf->numns = 0;
conf->domainname = NULL;
conf->searchnxt = 0;
}
}
+ if (ret != ISC_R_SUCCESS) {
+ goto error;
+ }
+
/* If we don't find a nameserver fall back to localhost */
if (conf->numns == 0U) {
INSIST(ISC_LIST_EMPTY(conf->nameservers));
* Construct unified search list from domain or configured
* search list
*/
- ISC_LIST_INIT(conf->searchlist);
if (conf->domainname != NULL) {
ret = add_search(conf, conf->domainname);
} else if (conf->searchnxt > 0) {
}
}
+ error:
conf->magic = IRS_RESCONF_MAGIC;
if (ret != ISC_R_SUCCESS)
}, {
"testdata/options.conf", ISC_R_SUCCESS,
NULL, ISC_R_SUCCESS
+ }, {
+ "testdata/options-bad-ndots.conf", ISC_R_RANGE,
+ NULL, ISC_R_SUCCESS
+ }, {
+ "testdata/options-empty.conf", ISC_R_UNEXPECTEDEND,
+ NULL, ISC_R_SUCCESS
}, {
"testdata/port.conf", ISC_R_SUCCESS,
NULL, ISC_R_SUCCESS
--- /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.
+
+search example.com example.net
+options ndots:256
--- /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.
+
+domain example.com
+options