Commit 8238ad91 authored by Ondřej Filip's avatar Ondřej Filip

Revert "Port does not have to be specified."

This reverts commit 007bf5e7.
parent 9eebd90b
......@@ -64,6 +64,16 @@ static void conf_acl_item(void *scanner, char *item)
snprintf(buf, sizeof(buf), "remote '%s' is not defined", item);
cf_error(scanner, buf);
} else {
/* check port if xfrin/notify-out */
if (this_list == &this_zone->acl.xfr_in ||
this_list == &this_zone->acl.notify_out) {
if (found->port == 0) {
cf_error(scanner, "remote specified for XFR/IN or NOTIFY/OUT "
" needs to have valid port!");
free(item);
return;
}
}
conf_remote_t *remote = malloc(sizeof(conf_remote_t));
if (!remote) {
cf_error(scanner, "out of memory");
......
......@@ -624,7 +624,7 @@ static int xfr_client_start(xfrworker_t *w, knot_ns_xfr_t *data)
sockaddr_update(&data->addr);
char r_addr[SOCKADDR_STRLEN];
sockaddr_tostr(&data->addr, r_addr, sizeof(r_addr));
int r_port = sockaddr_portnum(&data->addr) ? sockaddr_portnum(&data->addr) : CONFIG_DEFAULT_PORT;
int r_port = sockaddr_portnum(&data->addr);
/* Connect to remote. */
if (data->session <= 0) {
......
......@@ -521,7 +521,7 @@ static int zones_notify_send(event_t *e)
if (ret == buflen) {
char r_addr[SOCKADDR_STRLEN];
sockaddr_tostr(&ev->addr, r_addr, sizeof(r_addr));
int r_port = sockaddr_portnum(&ev->addr) ? sockaddr_portnum(&ev->addr) : CONFIG_DEFAULT_PORT;
int r_port = sockaddr_portnum(&ev->addr);
ev->msgid = knot_wire_get_id(qbuf);
log_server_info("Issued NOTIFY query to %s:%d, expecting "
"response ID=%d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment