No options statement in named.conf

Kevin J. Dunlap kevind at metaip.checkpoint.com
Wed Sep 13 16:20:48 UTC 2000


In BIND 8.2.3 T7B is it a requirement for there to be an options section in 
named.conf?

If you want to run named with all the defaults and not have an options 
statement
it complains on every zone section about there not being an option statement.
"no options statement before first zone; using previous/default"

If you have 50 zones you get 50 error messages.
This just does not seem right.

Here is a patch to ns_parser.y that only logs the error the first zone 
statement.

-Kevin


Index: ns_parser.y
===================================================================
RCS file: /proj/cvs/isc/bind/src/bin/named/ns_parser.y,v
retrieving revision 8.57
diff -c -r8.57 ns_parser.y
*** ns_parser.y	2000/08/21 07:41:28	8.57
--- ns_parser.y	2000/09/13 16:10:52
***************
*** 70,75 ****
--- 70,76 ----

   static options current_options;
   static int seen_options;
+ static int logged_options_error;

   static controls current_controls;

***************
*** 1467,1475 ****
   		symbol_value value;
   		char *zone_name;

! 		if (!seen_options)
   			parser_error(0,
                "no options statement before first zone; using 
previous/default");
   		sym_type = SYM_ZONE | ($3 & 0xffff);
   		value.pointer = NULL;
   		zone_name = canonical_name($2);
--- 1468,1479 ----
   		symbol_value value;
   		char *zone_name;

! 		if (!seen_options && !logged_options_error) {
   			parser_error(0,
                "no options statement before first zone; using 
previous/default");
+ 			logged_options_error = 1;
+ 		}
+
   		sym_type = SYM_ZONE | ($3 & 0xffff);
   		value.pointer = NULL;
   		zone_name = canonical_name($2);
***************
*** 1878,1883 ****
--- 1882,1888 ----
   static void
   parser_setup() {
   	seen_options = 0;
+ 	logged_options_error = 0;
   	seen_topology = 0;
   	symtab = new_symbol_table(SYMBOL_TABLE_SIZE, NULL);
   	if (authtab != NULL)




More information about the bind-workers mailing list