From 137a6934a14cf0c5b5c065e910b8b364beb0973f Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Mon, 7 Mar 2011 13:25:58 -0600 Subject: [PATCH 1/5] [trac617] Listen on port 53 instead of 5300. --- ChangeLog | 5 +++++ README | 2 -- doc/guide/bind10-guide.xml | 15 +-------------- src/bin/auth/auth.spec.pre.in | 6 +++--- src/bin/resolver/b10-resolver.8 | 2 +- src/bin/resolver/b10-resolver.xml | 5 +++-- src/bin/resolver/main.cc | 1 - src/bin/resolver/resolver.spec.pre.in | 6 +++--- 8 files changed, 16 insertions(+), 26 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7d113a29b..cea54af7c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ + 184. [func]* jreed + Listen on standard domain port 53 for b10-auth and + b10-resolver. + (Trac #617, #618) + 189. [bug] jreed Do not install the log message compiler. (Trac #634, git eb6441aca464980d00e3ff827cbf4195c5a7afc5) diff --git a/README b/README index 5bc31546a8..b10d12ee65 100644 --- a/README +++ b/README @@ -164,8 +164,6 @@ source tree: (Which will use the modules and configurations also from the source tree.) -The server will listen on port 5300 for DNS requests. - CONFIGURATION Commands can be given through the bindctl tool. diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml index 0935c810c3..bceb40cb02 100644 --- a/doc/guide/bind10-guide.xml +++ b/doc/guide/bind10-guide.xml @@ -336,14 +336,6 @@ var/ - - - The development prototype of the b10-auth server listens on - 0.0.0.0 (all interfaces) port 5300. (This is not the standard - domain service port.) - - - To quickly get started with BIND 10, follow these steps. @@ -397,7 +389,7 @@ var/ Test it; for example: - $ dig @127.0.0.1 -p 5300 -c CH -t TXT authors.bind + $ dig @127.0.0.1 -c CH -t TXT authors.bind @@ -1044,11 +1036,6 @@ TODO process. - - This development prototype release listens on all interfaces - and the non-standard port 5300. - -
Server Configurations diff --git a/src/bin/auth/auth.spec.pre.in b/src/bin/auth/auth.spec.pre.in index e95dabd7a0..9731ba336f 100644 --- a/src/bin/auth/auth.spec.pre.in +++ b/src/bin/auth/auth.spec.pre.in @@ -64,11 +64,11 @@ "item_default": [ { "address": "::1", - "port": 5300 + "port": 53 }, { "address": "127.0.0.1", - "port": 5300 + "port": 53 } ], "list_item_spec": { @@ -87,7 +87,7 @@ "item_name": "port", "item_type": "integer", "item_optional": false, - "item_default": 5300 + "item_default": 53 } ] } diff --git a/src/bin/resolver/b10-resolver.8 b/src/bin/resolver/b10-resolver.8 index 3125e32061..849092c007 100644 --- a/src/bin/resolver/b10-resolver.8 +++ b/src/bin/resolver/b10-resolver.8 @@ -74,7 +74,7 @@ to listen on\&. The list items are the \fIaddress\fR string and \fIport\fR -number\&. The defaults are address ::1 port 5300 and address 127\&.0\&.0\&.1 port 5300\&. +number\&. The defaults are address ::1 port 53 and address 127\&.0\&.0\&.1 port 53\&. .PP \fIretries\fR diff --git a/src/bin/resolver/b10-resolver.xml b/src/bin/resolver/b10-resolver.xml index 0d395a71dc..bdf4f8ad25 100644 --- a/src/bin/resolver/b10-resolver.xml +++ b/src/bin/resolver/b10-resolver.xml @@ -141,8 +141,9 @@ once that is merged you can for instance do 'config add Resolver/forward_address b10-resolver to listen on. The list items are the address string and port number. - The defaults are address ::1 port 5300 and - address 127.0.0.1 port 5300. + The defaults are address ::1 port 53 and + address 127.0.0.1 port 53. + diff --git a/src/bin/resolver/main.cc b/src/bin/resolver/main.cc index 03f9ab7cb5..d987c74ee9 100644 --- a/src/bin/resolver/main.cc +++ b/src/bin/resolver/main.cc @@ -56,7 +56,6 @@ using namespace asiolink; namespace { -// Default port current 5300 for testing purposes static const string PROGRAM = "Resolver"; IOService io_service; diff --git a/src/bin/resolver/resolver.spec.pre.in b/src/bin/resolver/resolver.spec.pre.in index bc598b0263..9df1e752d3 100644 --- a/src/bin/resolver/resolver.spec.pre.in +++ b/src/bin/resolver/resolver.spec.pre.in @@ -86,11 +86,11 @@ "item_default": [ { "address": "::1", - "port": 5300 + "port": 53 }, { "address": "127.0.0.1", - "port": 5300 + "port": 53 } ], "list_item_spec": { @@ -109,7 +109,7 @@ "item_name": "port", "item_type": "integer", "item_optional": false, - "item_default": 5300 + "item_default": 53 } ] } From de2d7124bd8a6bf3f2c0a6e661dc5b6b178765cc Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Tue, 8 Mar 2011 07:19:15 -0600 Subject: [PATCH 2/5] [master] remove trailing white space from several lines. --- src/lib/asiolink/qid_gen.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/asiolink/qid_gen.h b/src/lib/asiolink/qid_gen.h index ba3c23193c..a5caa17d83 100644 --- a/src/lib/asiolink/qid_gen.h +++ b/src/lib/asiolink/qid_gen.h @@ -28,7 +28,7 @@ namespace asiolink { - + /// This class generates Qids for outgoing queries /// /// It is implemented as a singleton; the public way to access it @@ -47,7 +47,7 @@ public: /// /// It is recommended that getInstance is used rather than creating /// separate instances of this class. - /// + /// /// The constructor automatically seeds the generator with the /// current time. QidGenerator(); @@ -61,21 +61,21 @@ public: /// /// This is automatically called by the constructor void seed(); - + private: - // "Mersenne Twister: A 623-dimensionally equidistributed - // uniform pseudo-random number generator", Makoto Matsumoto and - // Takuji Nishimura, ACM Transactions on Modeling and Computer - // Simulation: Special Issue on Uniform Random Number Generation, - // Vol. 8, No. 1, January 1998, pp. 3-30. + // "Mersenne Twister: A 623-dimensionally equidistributed + // uniform pseudo-random number generator", Makoto Matsumoto and + // Takuji Nishimura, ACM Transactions on Modeling and Computer + // Simulation: Special Issue on Uniform Random Number Generation, + // Vol. 8, No. 1, January 1998, pp. 3-30. // // mt19937 is an implementation of one of the pseudo random // generators described in this paper. boost::mt19937 generator_; - + // For qid's we want a uniform distribution boost::uniform_int<> dist_; - + boost::variate_generator > vgen_; }; From 2be9594e5c6cac0e01a75a06d8df31d8cef98380 Mon Sep 17 00:00:00 2001 From: Jelte Jansen Date: Tue, 8 Mar 2011 14:30:50 +0000 Subject: [PATCH 3/5] [master] fix for build problem on debian --- src/lib/asiolink/qid_gen.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/asiolink/qid_gen.cc b/src/lib/asiolink/qid_gen.cc index 1361b95b92..4063b39511 100644 --- a/src/lib/asiolink/qid_gen.cc +++ b/src/lib/asiolink/qid_gen.cc @@ -43,9 +43,7 @@ void QidGenerator::seed() { struct timeval tv; gettimeofday(&tv, 0); - long int seed; - seed = (tv.tv_sec * 1000000) + tv.tv_usec; - generator_.seed(seed); + generator_.seed((tv.tv_sec * 1000000) + tv.tv_usec); } isc::dns::qid_t From 65a77d8fde64d464c75917a1ab9b6b3f02640ca6 Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Tue, 8 Mar 2011 14:36:35 -0600 Subject: [PATCH 4/5] [master] Use :: and 0.0.0.0 for b10-auth (trac #649) Listen on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses for b10-auth. This returns to previous behavior prior to change #184. Document the listen_on configuration in manual. (Trac #649) --- ChangeLog | 6 ++++++ src/bin/auth/auth.spec.pre.in | 4 ++-- src/bin/auth/b10-auth.8 | 16 ++++++++++++++-- src/bin/auth/b10-auth.xml | 11 ++++++++++- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1bb1730305..adc7a93e21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ + 193. [func]* jreed + Listen on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses + for b10-auth. This returns to previous behavior prior to + change #184. Document the listen_on configuration in manual. + (Trac #649) + 192. [func]* jreed Listen on standard domain port 53 for b10-auth and b10-resolver. diff --git a/src/bin/auth/auth.spec.pre.in b/src/bin/auth/auth.spec.pre.in index 9731ba336f..d88ffb5e3e 100644 --- a/src/bin/auth/auth.spec.pre.in +++ b/src/bin/auth/auth.spec.pre.in @@ -63,11 +63,11 @@ "item_optional": false, "item_default": [ { - "address": "::1", + "address": "::", "port": 53 }, { - "address": "127.0.0.1", + "address": "0.0.0.0", "port": 53 } ], diff --git a/src/bin/auth/b10-auth.8 b/src/bin/auth/b10-auth.8 index dcbe6d8a0f..0356683b11 100644 --- a/src/bin/auth/b10-auth.8 +++ b/src/bin/auth/b10-auth.8 @@ -2,12 +2,12 @@ .\" Title: b10-auth .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 -.\" Date: February 22, 2011 +.\" Date: March 8, 2011 .\" Manual: BIND10 .\" Source: BIND10 .\" Language: English .\" -.TH "B10\-AUTH" "8" "February 22, 2011" "BIND10" "BIND10" +.TH "B10\-AUTH" "8" "March 8, 2011" "BIND10" "BIND10" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- @@ -70,6 +70,18 @@ defines the path to the SQLite3 zone file when using the sqlite datasource\&. Th /usr/local/var/bind10\-devel/zone\&.sqlite3\&. .PP +\fIlisten_on\fR +is a list of addresses and ports for +\fBb10\-auth\fR +to listen on\&. The list items are the +\fIaddress\fR +string and +\fIport\fR +number\&. By default, +\fBb10\-auth\fR +listens on port 53 on the IPv6 (::) and IPv4 (0\&.0\&.0\&.0) wildcard addresses\&. +.PP + \fIdatasources\fR configures data sources\&. The list items include: \fItype\fR diff --git a/src/bin/auth/b10-auth.xml b/src/bin/auth/b10-auth.xml index ce80689481..2b533947d1 100644 --- a/src/bin/auth/b10-auth.xml +++ b/src/bin/auth/b10-auth.xml @@ -20,7 +20,7 @@ - February 22, 2011 + March 8, 2011 @@ -131,6 +131,15 @@ /usr/local/var/bind10-devel/zone.sqlite3. + + listen_on is a list of addresses and ports for + b10-auth to listen on. + The list items are the address string + and port number. + By default, b10-auth listens on port 53 + on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses. + + datasources configures data sources. The list items include: From 241571157deb66f6766918b783379409e294e2f5 Mon Sep 17 00:00:00 2001 From: "Jeremy C. Reed" Date: Tue, 8 Mar 2011 14:37:55 -0600 Subject: [PATCH 5/5] [master] git object for latest change --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index adc7a93e21..ffa794b5b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,7 @@ Listen on the IPv6 (::) and IPv4 (0.0.0.0) wildcard addresses for b10-auth. This returns to previous behavior prior to change #184. Document the listen_on configuration in manual. - (Trac #649) + (Trac #649, git 65a77d8fde64d464c75917a1ab9b6b3f02640ca6) 192. [func]* jreed Listen on standard domain port 53 for b10-auth and