Commit 533df4ef authored by Mark Andrews's avatar Mark Andrews

537. [func] Use transfer-source{-v6} when notify messages.

parent f4166b4d
537. [func] Use transfer-source{-v6} when notify messages.
536. [func] Use transfer-source{-v6} when sending refresh queries.
Transfer-source{-v6} now take a optional port
parameter for setting the UDP source port. The port
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.63 2000/10/17 07:22:35 marka Exp $ */
/* $Id: zoneconf.c,v 1.64 2000/10/31 05:34:18 marka Exp $ */
#include <config.h>
......@@ -360,6 +360,24 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
dns_zone_setsigvalidityinterval(zone, uintval);
}
result = dns_c_zone_gettransfersource(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersource(cview, &sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersource(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any4;
dns_zone_setxfrsource4(zone, &sockaddr);
result = dns_c_zone_gettransfersourcev6(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersourcev6(cview, &sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersourcev6(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any6;
dns_zone_setxfrsource6(zone, &sockaddr);
/*
* Configure slave functionality.
*/
......@@ -398,27 +416,6 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
uintval = DNS_DEFAULT_IDLEIN;
dns_zone_setidlein(zone, uintval);
result = dns_c_zone_gettransfersource(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersource(cview,
&sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersource(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any4;
dns_zone_setxfrsource4(zone, &sockaddr);
result = dns_c_zone_gettransfersourcev6(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersourcev6(cview,
&sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersourcev6(cctx,
&sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any6;
dns_zone_setxfrsource6(zone, &sockaddr);
result = dns_c_zone_getmaxrefreshtime(czone, &uintval);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_getmaxrefreshtime(cview, &uintval);
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.10 2000/09/01 19:27:19 gson Exp $ */
/* $Id: named.conf,v 1.11 2000/10/31 05:34:07 marka Exp $ */
options {
query-source address 10.53.0.1;
transfer-source 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.11 2000/08/01 01:16:05 tale Exp $ */
/* $Id: named.conf,v 1.12 2000/10/31 05:34:08 marka Exp $ */
options {
query-source address 10.53.0.2;
transfer-source 10.53.0.2;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.2; };
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.13 2000/09/01 19:27:20 gson Exp $ */
/* $Id: named.conf,v 1.14 2000/10/31 05:34:10 marka Exp $ */
options {
query-source address 10.53.0.3;
transfer-source 10.53.0.3;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.3; };
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.13 2000/09/01 19:29:50 gson Exp $ */
/* $Id: named.conf,v 1.14 2000/10/31 05:34:11 marka Exp $ */
options {
query-source address 10.53.0.1;
transfer-source 10.53.0.1;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.1; };
......
......@@ -15,10 +15,11 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named.conf,v 1.10 2000/08/01 01:17:30 tale Exp $ */
/* $Id: named.conf,v 1.11 2000/10/31 05:34:12 marka Exp $ */
options {
query-source address 10.53.0.2;
transfer-source 10.53.0.2;
port 5300;
pid-file "named.pid";
listen-on { 10.53.0.2; };
......
......@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
<!-- File: $Id: Bv9ARM-book.xml,v 1.20 2000/10/31 01:17:14 marka Exp $ -->
<!-- File: $Id: Bv9ARM-book.xml,v 1.21 2000/10/31 05:34:14 marka Exp $ -->
<book>
......@@ -2968,9 +2968,8 @@ of the <command>server</command> statement.</para></entry>
<entry colname = "2"><para><command>transfer-source</command> determines
which local address will be bound to IPv4 TCP connections used to
fetch zones transferred inbound by the server. It also determines
the IPv4 address, and optionaly the UDP port, used for the refresh queries.
It also determines the IPv4 address used when updates are forwarded.
If not set, it defaults
the IPv4 address, and optionaly the UDP port, used for the refresh queries,
notify messages and when updates are forwarded. If not set, it defaults
to a system controlled value which will usually be the address of
the interface "closest to" the remote end. This address must appear
in the remote end's <command>allow-transfer</command> option for
......@@ -3749,8 +3748,8 @@ on loading and ignores the option.</para></entry>
<entry colname = "1"><para><command>transfer-source</command></para></entry>
<entry colname = "2"><para>Determines which local address will be bound
to the IPv4 TCP connection used to fetch this zone. It also determines
the IPv4 address, and optionaly the UDP port, used for the refresh queries.
It also determines the IPv4 address used when updates are forwarded. If not set,
the IPv4 address, and optionaly the UDP port, used for the refresh queries,
notify messages and when updates are forwarded. If not set,
it defaults to a system controlled value which will usually be the
address of the interface "closest to" the remote end. If the remote
end user is an <command>allow-transfer</command> option for this
......
......@@ -56,6 +56,10 @@ immediately after the "logging" statement was read.
In BIND 9, ACL names are case sensitive. In BIND 8 they were case
insensitive.
1.5. Notify messages and Refesh queries
The source address and port for these is now controlled by
transfer-source rather that query-source.
2. Zone File Compatibility
......@@ -155,4 +159,4 @@ see the man pages in doc/man/bin/rndc.1 and doc/man/bin/rndc.conf.5 for
details. Many of the ndc commands are still unimplemented in rndc.
$Id: migration,v 1.14 2000/09/18 23:41:20 gson Exp $
$Id: migration,v 1.15 2000/10/31 05:34:15 marka Exp $
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zone.c,v 1.243 2000/10/31 03:22:04 marka Exp $ */
/* $Id: zone.c,v 1.244 2000/10/31 05:34:17 marka Exp $ */
#include <config.h>
......@@ -2241,6 +2241,7 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
isc_netaddr_t dstip;
dns_tsigkey_t *key = NULL;
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_t src;
notify = event->ev_arg;
REQUIRE(DNS_NOTIFY_VALID(notify));
......@@ -2272,11 +2273,27 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
isc_sockaddr_format(&notify->dst, addrbuf, sizeof(addrbuf));
notify_log(notify->zone, ISC_LOG_INFO, "sending NOTIFY to %s",
addrbuf);
result = dns_request_create(notify->zone->view->requestmgr, message,
&notify->dst, 0, key, 15,
notify->zone->task,
notify_done, notify,
&notify->request);
switch (isc_sockaddr_pf(&notify->dst)) {
case PF_INET:
src = notify->zone->xfrsource4;
break;
case PF_INET6:
src = notify->zone->xfrsource6;
break;
default:
result = ISC_R_NOTIMPLEMENTED;
goto cleanup;
}
{
char buf[256];
isc_sockaddr_format(&src, buf, sizeof(buf));
fprintf(stderr, "notify via %s\n", buf);
}
result = dns_request_createvia(notify->zone->view->requestmgr, message,
&src, &notify->dst, 0, key, 15,
notify->zone->task,
notify_done, notify,
&notify->request);
if (key != NULL)
dns_tsigkey_detach(&key);
dns_message_destroy(&message);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.63 2000/10/17 07:22:35 marka Exp $ */
/* $Id: zoneconf.c,v 1.64 2000/10/31 05:34:18 marka Exp $ */
#include <config.h>
......@@ -360,6 +360,24 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
dns_zone_setsigvalidityinterval(zone, uintval);
}
result = dns_c_zone_gettransfersource(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersource(cview, &sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersource(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any4;
dns_zone_setxfrsource4(zone, &sockaddr);
result = dns_c_zone_gettransfersourcev6(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersourcev6(cview, &sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersourcev6(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any6;
dns_zone_setxfrsource6(zone, &sockaddr);
/*
* Configure slave functionality.
*/
......@@ -398,27 +416,6 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_c_view_t *cview,
uintval = DNS_DEFAULT_IDLEIN;
dns_zone_setidlein(zone, uintval);
result = dns_c_zone_gettransfersource(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersource(cview,
&sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersource(cctx, &sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any4;
dns_zone_setxfrsource4(zone, &sockaddr);
result = dns_c_zone_gettransfersourcev6(czone, &sockaddr);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_gettransfersourcev6(cview,
&sockaddr);
if (result != ISC_R_SUCCESS)
result = dns_c_ctx_gettransfersourcev6(cctx,
&sockaddr);
if (result != ISC_R_SUCCESS)
sockaddr = sockaddr_any6;
dns_zone_setxfrsource6(zone, &sockaddr);
result = dns_c_zone_getmaxrefreshtime(czone, &uintval);
if (result != ISC_R_SUCCESS && cview != NULL)
result = dns_c_view_getmaxrefreshtime(cview, &uintval);
......
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