]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 21:31:48 +0000 (21:31 +0000)
committerAndreas Gustafsson <source@isc.org>
Tue, 11 Jul 2000 21:31:48 +0000 (21:31 +0000)
 314.   [func]          Inet controls named.conf statement can now have
                        any non-negative number of keys specified.

lib/dns/config/confparser.y

index 16e6fc0ca2f3dab1a39a7015d1cddaf799bdfaf3..cac47eb22f81cb6fdd4cdad3f0225cf20653514b 100644 (file)
@@ -16,7 +16,7 @@
  * SOFTWARE.
  */
 
-/* $Id: confparser.y,v 1.99.2.1 2000/07/11 17:23:15 gson Exp $ */
+/* $Id: confparser.y,v 1.99.2.2 2000/07/11 21:31:48 gson Exp $ */
 
 #include <config.h>
 
@@ -226,6 +226,7 @@ static isc_boolean_t        int_too_big(isc_uint32_t base, isc_uint32_t mult);
        dns_rdataclass_t        orderclass;
        dns_c_ordering_t        ordering;
        dns_c_iplist_t         *iplist;
+       dns_c_kidlist_t        *kidlist;
 }
 
 /* Misc */
@@ -443,7 +444,8 @@ static isc_boolean_t        int_too_big(isc_uint32_t base, isc_uint32_t mult);
 %type <text>           channel_name
 %type <text>           domain_name
 %type <text>           key_value
-%type <text>           control_key
+%type <kidlist>                control_keys
+%type <kidlist>                keyid_list
 %type <text>           ordering_name
 %type <text>           secret
 %type <tformat>                transfer_format
@@ -1491,17 +1493,13 @@ controls: control L_EOS
 
 control: /* Empty */
        | L_INET maybe_wild_addr control_port
-         L_ALLOW L_LBRACE address_match_list L_RBRACE control_key
+         L_ALLOW L_LBRACE address_match_list L_RBRACE control_keys
        {
                dns_c_ctrl_t *control;
 
                tmpres = dns_c_ctrlinet_new(currcfg->mem, &control,
                                            $2, $3, $6, $8, ISC_FALSE);
 
-               if ($8 != NULL) {
-                       isc_mem_free(memctx, $8);
-               }
-               
                if (tmpres != ISC_R_SUCCESS) {
                        parser_error(ISC_FALSE,
                                     "failed to build inet control structure");
@@ -1529,13 +1527,13 @@ control: /* Empty */
        ;
 
 
-control_key: /* nothing */
+control_keys: /* nothing */
        {
                $$ = NULL;
        }
-       | L_KEYS key_value
+       | L_KEYS L_LBRACE keyid_list L_RBRACE
        {
-               $$ = $2;
+               $$ = $3;
        };
 
                
@@ -2867,6 +2865,36 @@ key_value: L_LBRACE any_string maybe_eos L_RBRACE
        };
 
 
+keyid_list: /* nothing */
+       {
+               dns_c_kidlist_t *kidlist = NULL;
+
+               tmpres = dns_c_kidlist_new(currcfg->mem, &kidlist);
+               if (tmpres != ISC_R_SUCCESS) {
+                       parser_error(ISC_FALSE, "failed to create kidlist");
+                       YYABORT;
+               }
+
+               $$ = kidlist;
+       }
+       | keyid_list any_string L_EOS
+       {
+               dns_c_kid_t *kid = NULL;
+
+               tmpres = dns_c_kid_new($$->mem, $2, &kid);
+               if (tmpres != ISC_R_SUCCESS) {
+                       parser_error(ISC_FALSE, "failed to create key id");
+                       dns_c_kidlist_delete(&$$);
+                       $$ = NULL;
+                       YYABORT;
+               }
+
+               isc_mem_free(memctx, $2);
+                       
+               dns_c_kidlist_append($$, kid);
+       };
+
+       
 /*
  * Address Matching
  */