summaryrefslogtreecommitdiff
path: root/bin/named/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/named/config.c')
-rw-r--r--bin/named/config.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/named/config.c b/bin/named/config.c
index ebc48cfc464ec..a32f12e660ae3 100644
--- a/bin/named/config.c
+++ b/bin/named/config.c
@@ -522,6 +522,13 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
REQUIRE(keysp != NULL && *keysp == NULL);
REQUIRE(countp != NULL);
+ /*
+ * Get system defaults.
+ */
+ result = ns_config_getport(config, &port);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+
newlist:
addrlist = cfg_tuple_get(list, "addresses");
portobj = cfg_tuple_get(list, "port");
@@ -534,10 +541,6 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
goto cleanup;
}
port = (in_port_t) val;
- } else {
- result = ns_config_getport(config, &port);
- if (result != ISC_R_SUCCESS)
- goto cleanup;
}
result = ISC_R_NOMEMORY;