diff --git a/doc/configuration.rst b/doc/configuration.rst index cb8803eb208e2d54654143707c19bd43efa8dc54..942fc5a6eb4bcdd3ed5dcc22414c7a9150a41b06 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -102,8 +102,7 @@ network subnet. Also a TSIG key can be specified:: key: key1 # Access based just on TSIG key action: xfer -Then the rules are referenced from zone :ref:`template_acl` or from -control :ref:`control_acl`:: +These rules can then be referenced from a zone :ref:`template_acl`:: zone: - domain: example.com diff --git a/doc/man/knot.conf.5in b/doc/man/knot.conf.5in index 4b1c90d2cb84cae2bd9858c0e8578c761fefcf31..71597a16a51234732188b55e8d3ff0750a805281 100644 --- a/doc/man/knot.conf.5in +++ b/doc/man/knot.conf.5in @@ -307,7 +307,7 @@ acl: \- id: STR address: ADDR[/INT] key: key_id - action: deny | xfer | notify | update | control ... + action: deny | xfer | notify | update ... .ft P .fi .UNINDENT @@ -340,8 +340,6 @@ Possible values: \fBnotify\fP \- Allow incoming notify .IP \(bu 2 \fBupdate\fP \- Allow zone updates -.IP \(bu 2 -\fBcontrol\fP \- Allow remote control .UNINDENT .sp Default: deny @@ -349,8 +347,8 @@ Default: deny .sp Configuration of the server remote control. .sp -Caution: The control protocol is not encrypted, and susceptible to replay -attacks in a short timeframe until message digest expires, for that reason, +Caution: The control protocol is not encrypted and is susceptible to replay +attacks in a short timeframe until message digest expires. For that reason, it is recommended to use default UNIX socket. .INDENT 0.0 .INDENT 3.5 @@ -359,7 +357,6 @@ it is recommended to use default UNIX socket. .ft C control: listen: ADDR[@INT] - acl: acl_id ... .ft P .fi .UNINDENT @@ -371,14 +368,6 @@ commands. Optional port specification (default is 5533) can be appended to the address using \fB@\fP separator. .sp Default: \fI\%rundir\fP/knot.sock -.SS acl -.sp -An ordered list of \fI\%references\fP to ACL rules allowing the remote -control. -.sp -Caution: This option has no effect with UNIX socket. -.sp -Default: empty .SH REMOTE SECTION .sp Definition of remote servers for zone transfers or notifications. diff --git a/doc/reference.rst b/doc/reference.rst index 25b01162932dbafa17bba7b912701f9f5ba52611..13b1deef32276bad5ca67456db96ef2b31783728 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -359,7 +359,7 @@ Access control list rules definition. - id: STR address: ADDR[/INT] key: key_id - action: deny | xfer | notify | update | control ... + action: deny | xfer | notify | update ... .. _acl_id: @@ -400,7 +400,6 @@ Possible values: - ``xfer`` - Allow zone transfer - ``notify`` - Allow incoming notify - ``update`` - Allow zone updates -- ``control`` - Allow remote control Default: deny @@ -411,15 +410,14 @@ Control section Configuration of the server remote control. -Caution: The control protocol is not encrypted, and susceptible to replay -attacks in a short timeframe until message digest expires, for that reason, +Caution: The control protocol is not encrypted and is susceptible to replay +attacks in a short timeframe until message digest expires. For that reason, it is recommended to use default UNIX socket. :: control: listen: ADDR[@INT] - acl: acl_id ... .. _control_listen: @@ -434,16 +432,6 @@ Default: :ref:`rundir<server_rundir>`/knot.sock .. _control_acl: -acl ---- - -An ordered list of :ref:`references<acl_id>` to ACL rules allowing the remote -control. - -Caution: This option has no effect with UNIX socket. - -Default: empty - .. _Remote section: Remote section diff --git a/src/knot/conf/scheme.c b/src/knot/conf/scheme.c index cc0793fcc625eb8baf1f9d9f0d2975152940ac76..105da4b366ae2ec5c7cfeca1127e90ef1f655b3b 100644 --- a/src/knot/conf/scheme.c +++ b/src/knot/conf/scheme.c @@ -52,7 +52,6 @@ static const lookup_table_t acl_actions[] = { { ACL_ACTION_XFER, "xfer" }, { ACL_ACTION_NOTF, "notify" }, { ACL_ACTION_DDNS, "update" }, - { ACL_ACTION_CNTL, "control" }, { 0, NULL } }; @@ -118,7 +117,6 @@ static const yp_item_t desc_acl[] = { static const yp_item_t desc_control[] = { { C_LISTEN, YP_TADDR, YP_VADDR = { REMOTE_PORT, REMOTE_SOCKET } }, - { C_ACL, YP_TREF, YP_VREF = { C_ACL }, YP_FMULTI, { check_ref } }, { C_COMMENT, YP_TSTR, YP_VNONE }, { NULL } }; @@ -177,10 +175,10 @@ static const yp_item_t desc_log[] = { const yp_item_t conf_scheme[] = { { C_SRV, YP_TGRP, YP_VGRP = { desc_server } }, + { C_CTL, YP_TGRP, YP_VGRP = { desc_control } }, { C_LOG, YP_TGRP, YP_VGRP = { desc_log }, YP_FMULTI }, { C_KEY, YP_TGRP, YP_VGRP = { desc_key }, YP_FMULTI }, { C_ACL, YP_TGRP, YP_VGRP = { desc_acl }, YP_FMULTI }, - { C_CTL, YP_TGRP, YP_VGRP = { desc_control } }, { C_RMT, YP_TGRP, YP_VGRP = { desc_remote }, YP_FMULTI }, /* MODULES */ { C_MOD_SYNTH_RECORD, YP_TGRP, YP_VGRP = { scheme_mod_synth_record }, YP_FMULTI }, diff --git a/src/knot/ctl/remote.c b/src/knot/ctl/remote.c index 47fb470d1801b7605e701d476470856523dd9965..848b4420c4816dbb2ef4273f0241d58838ae6c22 100644 --- a/src/knot/ctl/remote.c +++ b/src/knot/ctl/remote.c @@ -908,29 +908,13 @@ int remote_process(server_t *s, struct sockaddr_storage *ctl_addr, int sock, char addr_str[SOCKADDR_STRLEN] = { 0 }; sockaddr_tostr(addr_str, sizeof(addr_str), &ss); - /* Prepare tsig parameters. */ - knot_tsig_key_t tsig = { NULL }; - if (pkt->tsig_rr) { - tsig.name = pkt->tsig_rr->owner; - tsig.algorithm = knot_tsig_rdata_alg(pkt->tsig_rr); - } - - /* Check ACL. */ - rcu_read_lock(); - conf_val_t acl = conf_get(conf(), C_CTL, C_ACL); - bool allowed = acl_allowed(&acl, ACL_ACTION_CNTL, &ss, &tsig); - rcu_read_unlock(); - - if (!allowed) { - log_warning("remote control, denied '%s', " - "no matching ACL", addr_str); - remote_senderr(client, pkt->wire, pkt->size); - ret = KNOT_EACCES; - goto finish; - } - /* Check TSIG. */ - if (tsig.name != NULL) { + if (pkt->tsig_rr != NULL) { + knot_tsig_key_t tsig = { + .name = pkt->tsig_rr->owner, + .algorithm = knot_tsig_rdata_alg(pkt->tsig_rr) + }; + uint16_t ts_rc = 0; uint16_t ts_trc = 0; uint64_t ts_tmsigned = 0; diff --git a/src/knot/updates/acl.h b/src/knot/updates/acl.h index f271729d2733629c9d9ae804753c8cb171a2562e..041f4d9500bd1855993b6c0629b9bcad7a2eb675 100644 --- a/src/knot/updates/acl.h +++ b/src/knot/updates/acl.h @@ -35,8 +35,7 @@ typedef enum { ACL_ACTION_DENY = 0, ACL_ACTION_XFER = 1, ACL_ACTION_NOTF = 2, - ACL_ACTION_DDNS = 3, - ACL_ACTION_CNTL = 4 + ACL_ACTION_DDNS = 3 } acl_action_t; /*! diff --git a/src/utils/knot1to2/cf-parse.tab.c b/src/utils/knot1to2/cf-parse.tab.c index 94764d23523f6c203073cdaff5e3fce3aeda62c1..ef408d5122fb4e247c590ac07aac28d5ccd52e53 100644 --- a/src/utils/knot1to2/cf-parse.tab.c +++ b/src/utils/knot1to2/cf-parse.tab.c @@ -255,7 +255,6 @@ typedef enum { ACL_XFR, ACL_NTF, ACL_UPD, - ACL_CTL } acl_type_t; static void acl_start(void *scanner, acl_type_t type) @@ -268,7 +267,6 @@ static void acl_start(void *scanner, acl_type_t type) case ACL_XFR: extra->current_trie = extra->share->acl_xfer; break; case ACL_NTF: extra->current_trie = extra->share->acl_notify; break; case ACL_UPD: extra->current_trie = extra->share->acl_update; break; - case ACL_CTL: extra->current_trie = extra->share->acl_control; break; } } @@ -341,8 +339,7 @@ static bool is_acl(void *scanner, const char *str) { return hattrie_tryget(extra->share->acl_xfer, str, strlen(str)) != NULL || hattrie_tryget(extra->share->acl_notify, str, strlen(str)) != NULL || - hattrie_tryget(extra->share->acl_update, str, strlen(str)) != NULL || - hattrie_tryget(extra->share->acl_control, str, strlen(str)) != NULL; + hattrie_tryget(extra->share->acl_update, str, strlen(str)) != NULL; } static bool have_acl(void *scanner) { @@ -350,8 +347,7 @@ static bool have_acl(void *scanner) { return (hattrie_weight(extra->share->acl_xfer) + hattrie_weight(extra->share->acl_notify) + - hattrie_weight(extra->share->acl_update) + - hattrie_weight(extra->share->acl_control)) > 0; + hattrie_weight(extra->share->acl_update)) > 0; } static char *acl_actions(void *scanner, const char *str) { @@ -374,10 +370,6 @@ static char *acl_actions(void *scanner, const char *str) { strlcat(actions, _first ? "" : ", ", sizeof(actions)); _first = false; strlcat(actions, "update", sizeof(actions)); } - if (hattrie_tryget(extra->share->acl_control, str, strlen(str)) != NULL) { - strlcat(actions, _first ? "" : ", ", sizeof(actions)); _first = false; - strlcat(actions, "control", sizeof(actions)); - } strlcat(actions, "]", sizeof(actions)); @@ -408,7 +400,7 @@ static void grp_add(void *scanner, const char *value) } -#line 412 "cf-parse.tab.c" /* yacc.c:339 */ +#line 404 "cf-parse.tab.c" /* yacc.c:339 */ # ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus @@ -517,7 +509,7 @@ extern int cf_debug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 361 "cf-parse.y" /* yacc.c:355 */ +#line 353 "cf-parse.y" /* yacc.c:355 */ struct { char *t; @@ -525,7 +517,7 @@ union YYSTYPE size_t l; } tok; -#line 529 "cf-parse.tab.c" /* yacc.c:355 */ +#line 521 "cf-parse.tab.c" /* yacc.c:355 */ }; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 @@ -539,7 +531,7 @@ int cf_parse (void *scanner); /* Copy the second part of user declarations. */ -#line 543 "cf-parse.tab.c" /* yacc.c:358 */ +#line 535 "cf-parse.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -781,16 +773,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 334 +#define YYLAST 342 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 75 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 42 +#define YYNNTS 44 /* YYNRULES -- Number of rules. */ -#define YYNRULES 173 +#define YYNRULES 182 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 355 +#define YYNSTATES 363 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -843,24 +835,25 @@ static const yytype_uint8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 432, 432, 434, 436, 439, 440, 441, 442, 443, - 444, 445, 448, 449, 450, 451, 452, 453, 457, 461, - 461, 479, 480, 481, 482, 483, 484, 485, 486, 487, - 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, - 498, 499, 500, 501, 502, 503, 504, 515, 518, 525, - 526, 527, 528, 529, 530, 533, 534, 535, 536, 537, - 538, 539, 540, 541, 548, 549, 550, 554, 561, 561, - 597, 600, 602, 603, 607, 611, 612, 616, 617, 618, - 619, 620, 623, 624, 625, 626, 627, 628, 631, 632, - 633, 637, 640, 641, 644, 645, 646, 647, 648, 649, - 650, 651, 657, 661, 662, 663, 664, 665, 666, 667, - 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, - 678, 679, 679, 688, 690, 691, 695, 701, 702, 703, - 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, - 714, 715, 716, 717, 717, 725, 726, 727, 730, 731, - 731, 736, 740, 747, 748, 749, 753, 753, 758, 762, - 766, 767, 767, 778, 779, 782, 782, 782, 782, 782, - 782, 782, 782, 782 + 0, 424, 424, 426, 428, 431, 432, 433, 434, 435, + 436, 437, 440, 441, 442, 443, 444, 445, 449, 453, + 453, 471, 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, + 490, 491, 492, 493, 494, 495, 496, 507, 510, 517, + 518, 519, 520, 521, 522, 525, 526, 527, 528, 529, + 530, 531, 532, 533, 540, 541, 542, 546, 553, 553, + 589, 592, 594, 595, 599, 603, 604, 608, 609, 610, + 611, 612, 615, 616, 617, 618, 619, 620, 623, 624, + 625, 629, 632, 633, 636, 637, 638, 639, 640, 641, + 642, 643, 649, 653, 654, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, + 670, 671, 671, 680, 682, 683, 687, 693, 694, 695, + 696, 697, 698, 699, 700, 701, 702, 703, 704, 705, + 706, 707, 708, 709, 709, 717, 718, 719, 722, 723, + 723, 728, 732, 739, 740, 741, 745, 745, 750, 753, + 754, 755, 756, 757, 758, 761, 762, 763, 767, 771, + 772, 772, 783, 784, 787, 787, 787, 787, 787, 787, + 787, 787, 787 }; #endif @@ -890,7 +883,8 @@ static const char *const yytname[] = "query_module_list", "zone_start", "zone", "$@3", "query_genmodule", "query_genmodule_list", "zones", "$@4", "log_prios", "log_src", "$@5", "log_dest", "log_file", "log_start", "log", "$@6", "ctl_listen_start", - "ctl_allow_start", "control", "$@7", "conf", YY_NULLPTR + "ctl_allow_item", "ctl_allow_list", "ctl_allow_start", "control", "$@7", + "conf", YY_NULLPTR }; #endif @@ -910,12 +904,12 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -65 +#define YYPACT_NINF -69 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-65))) + (!!((Yystate) == (-69))) -#define YYTABLE_NINF -83 +#define YYTABLE_NINF -160 #define yytable_value_is_error(Yytable_value) \ 0 @@ -924,42 +918,43 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - -65, 4, 75, -65, -65, -64, -61, -40, -31, 6, - 9, 12, 35, -65, 14, 104, 0, 22, 1, 3, - 2, -42, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, 39, 98, - 83, 99, 100, 111, 137, 163, 164, 162, 167, 168, - 169, 175, 177, 178, 180, 181, 105, 182, 183, 170, - -65, 172, -65, -65, -65, -65, -65, -65, -65, 120, - -65, -65, 121, -65, 122, -65, -65, 184, 185, 190, - 191, 17, 106, 189, 194, 192, 197, 43, 149, 133, - -65, -65, -65, -65, -65, 134, 128, -65, -65, -65, - -65, -4, -65, -65, -65, 138, 139, 140, 141, 142, - 143, 144, 201, 145, 146, 147, 148, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 165, - 213, -65, 226, 227, 166, 171, 173, 174, 176, 179, - 186, 187, 188, 193, 195, 196, 198, 199, 200, -65, - -65, 228, 229, 230, 231, 235, 91, 114, -65, -65, - -65, -65, -65, 237, 239, 238, 244, 127, 204, 202, - -65, -65, 203, -65, -5, -25, -65, -65, -65, -65, - -65, -65, -65, -65, 205, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, 206, -65, -65, -65, 58, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, 245, 207, 208, 209, 210, 211, 212, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - -65, -5, -65, -65, -65, -65, -65, -65, -65, -56, - 246, -65, 224, 225, -46, -65, -65, -13, -65, 226, - 247, 232, 233, -65, -65, -65, -65, -65, -65, -65, - -65, -65, -65, -65, -65, -65, -65, -65, -65, 248, - -43, -65, -65, -65, -65, -65, 76, 253, -65, 249, - 79, 254, 33, -65, -65, -65, 245, -65, 256, 234, - 236, -65, -21, -6, 72, 85, 240, 241, -53, 26, - 242, 243, 250, 251, -65, -65, 248, -65, -65, -65, - -65, -65, 257, -65, 260, -65, -65, -65, 264, 265, - -65, 276, 287, -65, -65, -65, -65, -65, -65, 252, - 255, 258, 259, 261, 262, 266, -65, -65, -65, -65, - -65, -65, -27, -65, -65 + -69, 11, 106, -69, -69, -68, -33, 5, 10, 30, + 43, 48, 68, -69, 27, 135, 1, 45, 2, 53, + -17, -19, -69, -69, -69, -69, -69, -69, -69, -69, + -69, -69, -69, -69, -69, -69, -69, -69, 94, 121, + 86, 131, 132, 80, 168, 179, 180, 178, 183, 184, + 185, 186, 187, 188, 190, 191, 82, 192, 193, 195, + -69, 173, -69, -69, -69, -69, -69, -69, -69, 130, + -69, -69, 133, -69, 119, -69, -69, 194, 196, 200, + 202, 24, 136, 201, 197, 203, 204, 42, 157, 142, + -69, -69, -69, -69, -69, 143, -16, -69, -69, -69, + -69, -4, -69, -69, -69, 146, 147, 148, 149, 150, + 151, 152, 217, 155, 156, 158, 159, 160, 161, 162, + 163, 164, 165, 166, 167, 169, 170, 171, 172, 174, + 218, -69, 221, 232, 175, 176, 177, 181, 182, 189, + 198, 199, 205, 206, 207, 208, 209, 210, 211, -69, + -69, 237, 238, 239, 243, 246, 122, 137, -69, -69, + -69, -69, -69, 244, 249, 247, 250, 154, 212, 213, + -69, -69, 214, -69, -5, -26, -69, -69, -69, -69, + -69, -69, -69, -69, 216, -69, -69, -69, -69, -69, + -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, + -69, -69, 219, -69, -69, -69, 79, -69, -69, -69, + -69, -69, -69, -69, -69, -69, -69, -69, -69, -69, + -69, -69, -69, 252, 220, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 233, 234, 235, 236, 240, + -69, 3, -69, -69, -69, -69, -69, -69, -69, -65, + 254, -69, 215, 241, -31, -69, -69, 39, -69, 221, + 255, 242, 245, -69, -69, -69, -69, -69, -69, -69, + -69, -69, -69, -69, -69, -69, -69, -69, -69, 256, + -69, -69, -69, -69, -69, -64, -29, -69, -69, -69, + -69, -69, 104, 257, -69, 259, 107, 263, 20, -69, + -69, -69, 252, -69, 260, 251, 253, -69, -69, -69, + -25, -21, 100, 103, 258, 261, 54, 65, 262, 264, + 265, 266, -69, -69, 256, -69, -69, -69, -69, -69, + 267, -69, 275, -69, -69, -69, 276, 281, -69, 284, + 295, -69, -69, -69, -69, -69, -69, 268, 269, 270, + 271, 272, 273, 248, -69, -69, -69, -69, -69, -69, + -8, -69, -69 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -968,61 +963,62 @@ static const yytype_int16 yypact[] = static const yytype_uint8 yydefact[] = { 3, 0, 0, 1, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 165, 5, 0, 0, 49, 0, 94, - 0, 0, 4, 21, 47, 67, 75, 126, 18, 160, - 156, 6, 7, 11, 9, 8, 10, 167, 0, 0, + 0, 0, 0, 174, 5, 0, 0, 49, 0, 94, + 0, 0, 4, 21, 47, 67, 75, 126, 18, 169, + 156, 6, 7, 11, 9, 8, 10, 176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 166, 0, 168, 50, 54, 52, 51, 53, 169, 0, - 74, 170, 0, 102, 0, 95, 96, 0, 0, 0, + 175, 0, 177, 50, 54, 52, 51, 53, 178, 0, + 74, 179, 0, 102, 0, 95, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 100, 98, 97, 99, 171, 0, 0, 172, 159, 158, - 173, 0, 88, 153, 19, 0, 0, 0, 0, 0, + 100, 98, 97, 99, 180, 0, 0, 181, 168, 158, + 182, 0, 165, 153, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 103, 0, 0, 0, 0, 0, 0, 0, 77, 78, 81, 79, 80, 0, 0, 0, 0, 0, 0, 0, - 127, 88, 0, 161, 164, 157, 12, 24, 25, 43, + 127, 88, 0, 170, 173, 157, 12, 24, 25, 43, 22, 23, 26, 27, 0, 28, 31, 32, 33, 46, 29, 30, 34, 35, 36, 37, 38, 40, 39, 41, 42, 44, 0, 55, 70, 72, 0, 101, 128, 130, 133, 134, 135, 136, 132, 131, 129, 137, 138, 139, 140, 141, 142, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 121, 104, 163, 12, 83, 87, 85, 84, 86, 0, + 121, 104, 172, 12, 160, 164, 162, 161, 163, 0, 0, 151, 0, 0, 0, 45, 48, 0, 76, 0, 0, 0, 0, 105, 106, 108, 111, 112, 113, 114, 110, 109, 107, 115, 116, 117, 118, 119, 120, 92, - 0, 90, 89, 152, 148, 148, 0, 0, 20, 0, - 0, 0, 0, 69, 73, 123, 124, 144, 0, 0, - 0, 162, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 125, 91, 92, 122, 149, 154, - 155, 14, 0, 16, 0, 13, 63, 57, 0, 0, - 60, 0, 0, 56, 66, 64, 65, 93, 145, 0, - 0, 0, 0, 0, 0, 150, 15, 17, 58, 59, - 61, 62, 0, 147, 146 + 83, 87, 85, 84, 86, 0, 0, 167, 166, 152, + 148, 148, 0, 0, 20, 0, 0, 0, 0, 69, + 73, 123, 124, 144, 0, 0, 0, 90, 89, 171, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 125, 91, 92, 122, 149, 154, 155, 14, + 0, 16, 0, 13, 63, 57, 0, 0, 60, 0, + 0, 56, 66, 64, 65, 93, 145, 0, 0, 0, + 0, 0, 0, 150, 15, 17, 58, 59, 61, 62, + 0, 147, 146 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -65, -65, -65, -65, -7, -65, -65, -65, -65, -65, - -65, -65, -65, 38, -65, -65, -65, -65, -65, 123, - -65, -18, -65, -65, -65, -65, 8, -65, -65, -65, - 15, -65, -65, -65, -65, -65, -65, -65, -65, -65, - -65, -65 + -69, -69, -69, -69, 19, -69, -69, -69, -69, -69, + -69, -69, -69, 12, -69, -69, -69, -69, -69, -69, + -69, -54, -69, -69, -69, -69, -30, -69, -69, -69, + 15, -69, -69, -69, -69, -69, -69, -69, -69, -69, + -69, -69, -69, -69 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 2, 38, 254, 14, 176, 15, 16, 69, - 257, 17, 203, 205, 206, 72, 18, 171, 249, 174, - 299, 300, 95, 96, 279, 261, 262, 19, 223, 345, - 302, 338, 252, 253, 175, 20, 103, 101, 102, 21, - 243, 22 + 257, 17, 203, 205, 206, 72, 18, 171, 285, 241, + 305, 306, 95, 96, 279, 261, 262, 19, 223, 353, + 310, 346, 252, 253, 175, 20, 103, 101, 249, 174, + 102, 21, 243, 22 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1030,78 +1026,80 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 244, 172, 289, 250, 3, 61, 70, 23, 73, 74, - 24, 286, 287, 281, 286, 287, 327, 328, 282, 31, - 329, 98, 99, 138, 139, 75, 288, 63, 76, 301, - 100, 25, 77, 78, 79, 80, 81, 82, 311, 32, - 26, 251, 353, 83, 290, 291, 318, 354, 292, 146, - 147, 319, 84, 85, 86, 87, 88, 245, 89, 293, - 246, 318, 247, 248, -82, 90, 320, 173, 91, -82, - 92, 93, 62, 71, 97, 94, 33, 27, 4, 34, - 28, 35, 36, 29, 64, 5, 37, 65, 107, 66, - 67, 6, 312, 313, 68, 330, 331, 229, 230, 332, - 7, 8, 9, 105, 108, 110, 30, 106, 109, 111, - 104, 125, 140, 126, 141, 39, 40, 41, 42, 43, - 231, 44, 232, 45, 46, 47, 48, 49, 50, 112, - 258, 10, 259, 237, 238, 304, 305, 11, 308, 309, - 12, 321, 322, 113, 13, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 323, 324, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 114, - 115, 116, 117, 118, 119, 129, 60, 164, 165, 166, - 167, 168, 120, 169, 121, 122, 123, 124, 127, 128, - 130, 131, 132, 134, 135, 133, 136, 137, 142, 143, - 170, 144, 145, 148, 149, 150, 184, 177, 178, 179, - 180, 181, 182, 183, 185, 186, 187, 188, 202, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 204, 207, 224, 201, 208, 280, 227, 225, 226, - 209, 228, 210, 211, 234, 212, 233, 235, 213, 236, - 260, 283, 295, 298, 307, 214, 215, 216, 239, 306, - 310, 315, 217, 339, 218, 219, 340, 220, 221, 222, - 341, 342, 242, 240, 255, 256, 263, 264, 265, 266, - 267, 268, 343, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 344, 241, 284, 285, 294, 337, 0, - 303, 296, 0, 316, 314, 297, 0, 0, 317, 325, - 326, 333, 334, 0, 0, 0, 0, 0, 0, 335, - 336, 346, 0, 0, 347, 0, 0, 348, 349, 0, - 350, 351, 0, 0, 352 + 244, 172, 250, 23, 287, 307, 61, 70, 280, 288, + 308, 3, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, 319, 292, 293, 292, 293, + 138, 139, 31, 164, 165, 166, 167, 168, 24, 169, + 251, 294, 326, 309, 98, 99, 326, 327, 146, 147, + 63, 328, 32, 100, 295, 97, 170, 245, 73, 74, + 246, 361, 247, 248, -159, 281, 362, 173, 282, -159, + 283, 284, -82, 62, 71, 75, 25, -82, 76, 320, + 321, 26, 77, 78, 79, 80, 81, 82, 125, 33, + 126, 107, 34, 83, 35, 36, 296, 297, 112, 37, + 298, 27, 84, 85, 86, 87, 88, 64, 89, 4, + 65, 299, 66, 67, 28, 90, 5, 68, 91, 29, + 92, 93, 6, 335, 336, 94, 105, 337, 229, 230, + 106, 7, 8, 9, 338, 339, 108, 110, 340, 30, + 109, 111, 140, 231, 141, 232, 39, 40, 41, 42, + 43, 258, 44, 259, 45, 46, 47, 48, 49, 50, + 237, 238, 10, 312, 313, 104, 316, 317, 11, 329, + 330, 12, 331, 332, 113, 13, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 114, 115, 116, 117, 118, + 119, 130, 133, 120, 121, 122, 123, 124, 127, 128, + 129, 131, 143, 134, 132, 135, 136, 60, 137, 145, + 142, 148, 144, 149, 150, 177, 178, 179, 180, 181, + 182, 183, 184, 202, 185, 186, 204, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 207, 197, 198, + 199, 200, 224, 201, 208, 209, 210, 225, 226, 227, + 211, 212, 228, 233, 234, 236, 235, 260, 213, 289, + 301, 304, 286, 314, 315, 323, 239, 214, 215, 318, + 345, 300, 322, 347, 216, 217, 218, 219, 220, 221, + 222, 348, 349, 242, 240, 255, 290, 350, 256, 263, + 351, 264, 265, 266, 267, 268, 269, 270, 271, 272, + 273, 352, 274, 275, 276, 277, 311, 0, 0, 278, + 0, 302, 291, 0, 0, 0, 360, 303, 0, 0, + 324, 0, 0, 0, 0, 325, 0, 333, 0, 0, + 334, 341, 0, 342, 343, 344, 0, 354, 355, 356, + 357, 358, 359 }; static const yytype_int16 yycheck[] = { - 5, 5, 15, 28, 0, 5, 5, 71, 5, 6, - 71, 57, 58, 69, 57, 58, 69, 70, 74, 5, - 73, 63, 64, 6, 7, 22, 72, 5, 25, 72, - 72, 71, 29, 30, 31, 32, 33, 34, 5, 25, - 71, 66, 69, 40, 57, 58, 67, 74, 61, 6, - 7, 72, 49, 50, 51, 52, 53, 62, 55, 72, - 65, 67, 67, 68, 69, 62, 72, 71, 65, 74, - 67, 68, 72, 72, 72, 72, 62, 71, 3, 65, - 71, 67, 68, 71, 62, 10, 72, 65, 5, 67, - 68, 16, 59, 60, 72, 69, 70, 6, 7, 73, - 25, 26, 27, 5, 5, 5, 71, 9, 9, 9, - 71, 6, 6, 8, 8, 11, 12, 13, 14, 15, - 6, 17, 8, 19, 20, 21, 22, 23, 24, 18, - 72, 56, 74, 6, 7, 59, 60, 62, 59, 60, - 65, 69, 70, 6, 69, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 69, 70, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 6, - 6, 9, 5, 5, 5, 5, 72, 49, 50, 51, - 52, 53, 7, 55, 7, 7, 6, 6, 6, 6, - 18, 71, 71, 9, 9, 73, 6, 6, 9, 5, - 72, 9, 5, 54, 71, 71, 5, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 5, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 5, 5, 5, 69, 69, 243, 6, 9, 9, - 69, 6, 69, 69, 5, 69, 9, 9, 69, 5, - 5, 5, 5, 5, 5, 69, 69, 69, 54, 6, - 6, 5, 69, 6, 69, 69, 6, 69, 69, 69, - 6, 6, 69, 71, 69, 69, 69, 69, 69, 69, - 69, 69, 6, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 6, 171, 71, 71, 259, 316, -1, - 285, 69, -1, 69, 296, 72, -1, -1, 72, 69, - 69, 69, 69, -1, -1, -1, -1, -1, -1, 69, - 69, 69, -1, -1, 69, -1, -1, 69, 69, -1, - 69, 69, -1, -1, 68 + 5, 5, 28, 71, 69, 69, 5, 5, 5, 74, + 74, 0, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 5, 57, 58, 57, 58, + 6, 7, 5, 49, 50, 51, 52, 53, 71, 55, + 66, 72, 67, 72, 63, 64, 67, 72, 6, 7, + 5, 72, 25, 72, 15, 72, 72, 62, 5, 6, + 65, 69, 67, 68, 69, 62, 74, 71, 65, 74, + 67, 68, 69, 72, 72, 22, 71, 74, 25, 59, + 60, 71, 29, 30, 31, 32, 33, 34, 6, 62, + 8, 5, 65, 40, 67, 68, 57, 58, 18, 72, + 61, 71, 49, 50, 51, 52, 53, 62, 55, 3, + 65, 72, 67, 68, 71, 62, 10, 72, 65, 71, + 67, 68, 16, 69, 70, 72, 5, 73, 6, 7, + 9, 25, 26, 27, 69, 70, 5, 5, 73, 71, + 9, 9, 6, 6, 8, 8, 11, 12, 13, 14, + 15, 72, 17, 74, 19, 20, 21, 22, 23, 24, + 6, 7, 56, 59, 60, 71, 59, 60, 62, 69, + 70, 65, 69, 70, 6, 69, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 6, 6, 9, 5, 5, + 5, 18, 73, 7, 7, 7, 6, 6, 6, 6, + 5, 71, 5, 9, 71, 9, 6, 72, 6, 5, + 9, 54, 9, 71, 71, 69, 69, 69, 69, 69, + 69, 69, 5, 5, 69, 69, 5, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 5, 69, 69, + 69, 69, 5, 69, 69, 69, 69, 9, 9, 6, + 69, 69, 6, 9, 5, 5, 9, 5, 69, 5, + 5, 5, 243, 6, 5, 5, 54, 69, 69, 6, + 324, 259, 302, 6, 69, 69, 69, 69, 69, 69, + 69, 6, 6, 69, 71, 69, 71, 6, 69, 69, + 6, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 6, 69, 69, 69, 69, 291, -1, -1, 69, + -1, 69, 71, -1, -1, -1, 68, 72, -1, -1, + 69, -1, -1, -1, -1, 72, -1, 69, -1, -1, + 69, 69, -1, 69, 69, 69, -1, 69, 69, 69, + 69, 69, 69 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1110,7 +1108,7 @@ static const yytype_uint8 yystos[] = { 0, 76, 77, 0, 3, 10, 16, 25, 26, 27, 56, 62, 65, 69, 80, 82, 83, 86, 91, 102, - 110, 114, 116, 71, 71, 71, 71, 71, 71, 71, + 110, 116, 118, 71, 71, 71, 71, 71, 71, 71, 71, 5, 25, 62, 65, 67, 68, 72, 78, 11, 12, 13, 14, 15, 17, 19, 20, 21, 22, 23, 24, 41, 42, 43, 44, 45, 46, 47, 48, 49, @@ -1118,32 +1116,33 @@ static const yytype_uint8 yystos[] = 5, 72, 90, 5, 6, 22, 25, 29, 30, 31, 32, 33, 34, 40, 49, 50, 51, 52, 53, 55, 62, 65, 67, 68, 72, 97, 98, 72, 63, 64, - 72, 112, 113, 111, 71, 5, 9, 5, 5, 9, + 72, 112, 115, 111, 71, 5, 9, 5, 5, 9, 5, 9, 18, 6, 6, 6, 9, 5, 5, 5, 7, 7, 7, 6, 6, 6, 8, 6, 6, 5, 18, 71, 71, 73, 9, 9, 6, 6, 6, 7, 6, 8, 9, 5, 9, 5, 6, 7, 54, 71, 71, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 49, 50, 51, 52, 53, 55, - 72, 92, 5, 71, 94, 109, 81, 69, 69, 69, + 72, 92, 5, 71, 114, 109, 81, 69, 69, 69, 69, 69, 69, 69, 5, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 5, 87, 5, 88, 89, 5, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 103, 5, 9, 9, 6, 6, 6, 7, 6, 8, 9, 5, 9, 5, 6, 7, 54, - 71, 94, 69, 115, 5, 62, 65, 67, 68, 93, + 71, 94, 69, 117, 5, 62, 65, 67, 68, 113, 28, 66, 107, 108, 79, 69, 69, 85, 72, 74, 5, 100, 101, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 99, - 79, 69, 74, 5, 71, 71, 57, 58, 72, 15, - 57, 58, 61, 72, 88, 5, 69, 72, 5, 95, - 96, 72, 105, 105, 59, 60, 6, 5, 59, 60, - 6, 5, 59, 60, 101, 5, 69, 72, 67, 72, - 72, 69, 70, 69, 70, 69, 69, 69, 70, 73, - 69, 70, 73, 69, 69, 69, 69, 96, 106, 6, - 6, 6, 6, 6, 6, 104, 69, 69, 69, 69, - 69, 69, 68, 69, 74 + 5, 62, 65, 67, 68, 93, 79, 69, 74, 5, + 71, 71, 57, 58, 72, 15, 57, 58, 61, 72, + 88, 5, 69, 72, 5, 95, 96, 69, 74, 72, + 105, 105, 59, 60, 6, 5, 59, 60, 6, 5, + 59, 60, 101, 5, 69, 72, 67, 72, 72, 69, + 70, 69, 70, 69, 69, 69, 70, 73, 69, 70, + 73, 69, 69, 69, 69, 96, 106, 6, 6, 6, + 6, 6, 6, 104, 69, 69, 69, 69, 69, 69, + 68, 69, 74 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -1165,8 +1164,9 @@ static const yytype_uint8 yyr1[] = 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 103, 102, 104, 104, 104, 105, 106, 105, 107, 108, 109, 109, 109, 111, 110, 112, 113, - 114, 115, 114, 114, 114, 116, 116, 116, 116, 116, - 116, 116, 116, 116 + 113, 113, 113, 113, 113, 114, 114, 114, 115, 116, + 117, 116, 116, 116, 118, 118, 118, 118, 118, 118, + 118, 118, 118 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1187,9 +1187,10 @@ static const yytype_uint8 yyr2[] = 4, 0, 6, 2, 0, 3, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 6, 0, 3, 3, 0, 0, - 4, 1, 2, 0, 5, 5, 0, 4, 1, 1, - 2, 0, 6, 4, 3, 1, 2, 2, 2, 2, - 2, 2, 2, 2 + 4, 1, 2, 0, 5, 5, 0, 4, 1, 0, + 1, 1, 1, 1, 1, 0, 3, 3, 1, 2, + 0, 6, 4, 3, 1, 2, 2, 2, 2, 2, + 2, 2, 2 }; @@ -1872,97 +1873,97 @@ yyreduce: switch (yyn) { case 2: -#line 432 "cf-parse.y" /* yacc.c:1646 */ +#line 424 "cf-parse.y" /* yacc.c:1646 */ { return 0; } -#line 1878 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1879 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 6: -#line 440 "cf-parse.y" /* yacc.c:1646 */ +#line 432 "cf-parse.y" /* yacc.c:1646 */ { _str = (yyvsp[0].tok).t; } -#line 1884 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1885 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 7: -#line 441 "cf-parse.y" /* yacc.c:1646 */ +#line 433 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 1890 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1891 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 8: -#line 442 "cf-parse.y" /* yacc.c:1646 */ +#line 434 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t + 1); } -#line 1896 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1897 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 9: -#line 443 "cf-parse.y" /* yacc.c:1646 */ +#line 435 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 1902 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1903 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 10: -#line 444 "cf-parse.y" /* yacc.c:1646 */ +#line 436 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 1908 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1909 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 11: -#line 445 "cf-parse.y" /* yacc.c:1646 */ +#line 437 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 1914 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1915 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 13: -#line 449 "cf-parse.y" /* yacc.c:1646 */ +#line 441 "cf-parse.y" /* yacc.c:1646 */ { _port = (yyvsp[-1].tok).i; } -#line 1920 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1921 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 14: -#line 450 "cf-parse.y" /* yacc.c:1646 */ +#line 442 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-1].tok).t; } -#line 1926 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1927 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 15: -#line 451 "cf-parse.y" /* yacc.c:1646 */ +#line 443 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _port = (yyvsp[-1].tok).i; } -#line 1932 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1933 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 16: -#line 452 "cf-parse.y" /* yacc.c:1646 */ +#line 444 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-1].tok).t; } -#line 1938 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1939 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 17: -#line 453 "cf-parse.y" /* yacc.c:1646 */ +#line 445 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _port = (yyvsp[-1].tok).i; } -#line 1944 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1945 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 18: -#line 457 "cf-parse.y" /* yacc.c:1646 */ +#line 449 "cf-parse.y" /* yacc.c:1646 */ { _str = NULL; f_section(scanner, R_IF, S_SRV); } -#line 1953 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1954 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 19: -#line 461 "cf-parse.y" /* yacc.c:1646 */ +#line 453 "cf-parse.y" /* yacc.c:1646 */ { _addr = NULL, _port = -1; f_name(scanner, R_IF, C_LISTEN, false); } -#line 1962 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1963 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 20: -#line 465 "cf-parse.y" /* yacc.c:1646 */ +#line 457 "cf-parse.y" /* yacc.c:1646 */ { if (_addr != NULL && _port == -1) { if_add(scanner, _str, _addr); @@ -1974,161 +1975,161 @@ yyreduce: free(_str); free(_addr); } -#line 1978 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1979 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 21: -#line 479 "cf-parse.y" /* yacc.c:1646 */ +#line 471 "cf-parse.y" /* yacc.c:1646 */ { f_section(scanner, R_SYS, S_SRV); } -#line 1984 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1985 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 22: -#line 480 "cf-parse.y" /* yacc.c:1646 */ +#line 472 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_SYS, C_VERSION, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 1990 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1991 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 23: -#line 481 "cf-parse.y" /* yacc.c:1646 */ +#line 473 "cf-parse.y" /* yacc.c:1646 */ { f_auto_str(scanner, R_SYS, C_VERSION, (yyvsp[-1].tok).i); } -#line 1996 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 1997 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 24: -#line 482 "cf-parse.y" /* yacc.c:1646 */ +#line 474 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_SYS, C_IDENT, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2002 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2003 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 25: -#line 483 "cf-parse.y" /* yacc.c:1646 */ +#line 475 "cf-parse.y" /* yacc.c:1646 */ { f_auto_str(scanner, R_SYS, C_IDENT, (yyvsp[-1].tok).i); } -#line 2008 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2009 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 26: -#line 484 "cf-parse.y" /* yacc.c:1646 */ +#line 476 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_SYS, C_NSID, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2014 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2015 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 27: -#line 485 "cf-parse.y" /* yacc.c:1646 */ +#line 477 "cf-parse.y" /* yacc.c:1646 */ { f_auto_str(scanner, R_SYS, C_NSID, (yyvsp[-1].tok).i); } -#line 2020 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2021 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 28: -#line 486 "cf-parse.y" /* yacc.c:1646 */ +#line 478 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_MAX_UDP_PAYLOAD, (yyvsp[-1].tok).i); } -#line 2026 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2027 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 29: -#line 487 "cf-parse.y" /* yacc.c:1646 */ +#line 479 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_SYS, C_RUNDIR, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2032 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2033 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 30: -#line 488 "cf-parse.y" /* yacc.c:1646 */ +#line 480 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_SYS, C_PIDFILE, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2038 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2039 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 31: -#line 489 "cf-parse.y" /* yacc.c:1646 */ +#line 481 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_WORKERS, (yyvsp[-1].tok).i); } -#line 2044 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2045 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 32: -#line 490 "cf-parse.y" /* yacc.c:1646 */ +#line 482 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_BG_WORKERS, (yyvsp[-1].tok).i); } -#line 2050 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2051 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 33: -#line 491 "cf-parse.y" /* yacc.c:1646 */ +#line 483 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_SYS, C_ASYNC_START, (yyvsp[-1].tok).i); } -#line 2056 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2057 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 34: -#line 492 "cf-parse.y" /* yacc.c:1646 */ +#line 484 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_MAX_CONN_IDLE, (yyvsp[-1].tok).i); } -#line 2062 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2063 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 35: -#line 493 "cf-parse.y" /* yacc.c:1646 */ +#line 485 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_MAX_CONN_HANDSHAKE, (yyvsp[-1].tok).i); } -#line 2068 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2069 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 36: -#line 494 "cf-parse.y" /* yacc.c:1646 */ +#line 486 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_MAX_CONN_REPLY, (yyvsp[-1].tok).i); } -#line 2074 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2075 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 37: -#line 495 "cf-parse.y" /* yacc.c:1646 */ +#line 487 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_MAX_TCP_CLIENTS, (yyvsp[-1].tok).i); } -#line 2080 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2081 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 38: -#line 496 "cf-parse.y" /* yacc.c:1646 */ +#line 488 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_RATE_LIMIT, (yyvsp[-1].tok).i); } -#line 2086 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2087 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 39: -#line 497 "cf-parse.y" /* yacc.c:1646 */ +#line 489 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_RATE_LIMIT_SIZE, (yyvsp[-1].tok).l); } -#line 2092 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2093 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 40: -#line 498 "cf-parse.y" /* yacc.c:1646 */ +#line 490 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_RATE_LIMIT_SIZE, (yyvsp[-1].tok).i); } -#line 2098 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2099 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 41: -#line 499 "cf-parse.y" /* yacc.c:1646 */ +#line 491 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_RATE_LIMIT_SLIP, (yyvsp[-1].tok).i); } -#line 2104 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2105 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 42: -#line 500 "cf-parse.y" /* yacc.c:1646 */ +#line 492 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_SYS, C_TRANSFERS, (yyvsp[-1].tok).i); } -#line 2110 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2111 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 43: -#line 501 "cf-parse.y" /* yacc.c:1646 */ +#line 493 "cf-parse.y" /* yacc.c:1646 */ { /* Deprecated */ free((yyvsp[-1].tok).t); } -#line 2116 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2117 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 44: -#line 502 "cf-parse.y" /* yacc.c:1646 */ +#line 494 "cf-parse.y" /* yacc.c:1646 */ { /* Deprecated */ free((yyvsp[-1].tok).t); } -#line 2122 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2123 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 45: -#line 503 "cf-parse.y" /* yacc.c:1646 */ +#line 495 "cf-parse.y" /* yacc.c:1646 */ { /* Deprecated */ free((yyvsp[-2].tok).t); free((yyvsp[-1].tok).t); } -#line 2128 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2129 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 46: -#line 504 "cf-parse.y" /* yacc.c:1646 */ +#line 496 "cf-parse.y" /* yacc.c:1646 */ { char *sep = strchr((yyvsp[-1].tok).t, '.'); if (sep != NULL) { @@ -2137,101 +2138,101 @@ yyreduce: f_str(scanner, R_SYS, C_USER, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2141 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2142 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 47: -#line 515 "cf-parse.y" /* yacc.c:1646 */ +#line 507 "cf-parse.y" /* yacc.c:1646 */ { f_section(scanner, R_KEY, S_KEY); } -#line 2149 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2150 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 48: -#line 518 "cf-parse.y" /* yacc.c:1646 */ +#line 510 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_KEY, C_ID, (yyvsp[-3].tok).t); free((yyvsp[-3].tok).t); f_str(scanner, R_KEY, C_ALG, (yyvsp[-2].tok).t); free((yyvsp[-2].tok).t); f_quote(scanner, R_KEY, C_SECRET, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2159 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2160 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 50: -#line 526 "cf-parse.y" /* yacc.c:1646 */ +#line 518 "cf-parse.y" /* yacc.c:1646 */ { _str = (yyvsp[0].tok).t; } -#line 2165 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2166 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 51: -#line 527 "cf-parse.y" /* yacc.c:1646 */ +#line 519 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t + 1); } -#line 2171 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2172 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 52: -#line 528 "cf-parse.y" /* yacc.c:1646 */ +#line 520 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 2177 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2178 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 53: -#line 529 "cf-parse.y" /* yacc.c:1646 */ +#line 521 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 2183 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2184 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 54: -#line 530 "cf-parse.y" /* yacc.c:1646 */ +#line 522 "cf-parse.y" /* yacc.c:1646 */ { _str = strdup((yyvsp[0].tok).t); } -#line 2189 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2190 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 56: -#line 534 "cf-parse.y" /* yacc.c:1646 */ +#line 526 "cf-parse.y" /* yacc.c:1646 */ { _port = (yyvsp[-1].tok).i; } -#line 2195 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2196 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 57: -#line 535 "cf-parse.y" /* yacc.c:1646 */ +#line 527 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-1].tok).t; } -#line 2201 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2202 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 58: -#line 536 "cf-parse.y" /* yacc.c:1646 */ +#line 528 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _port = (yyvsp[-1].tok).i; } -#line 2207 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2208 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 59: -#line 537 "cf-parse.y" /* yacc.c:1646 */ +#line 529 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _mask = (yyvsp[-1].tok).i; } -#line 2213 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2214 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 60: -#line 538 "cf-parse.y" /* yacc.c:1646 */ +#line 530 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-1].tok).t; } -#line 2219 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2220 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 61: -#line 539 "cf-parse.y" /* yacc.c:1646 */ +#line 531 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _port = (yyvsp[-1].tok).i; } -#line 2225 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2226 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 62: -#line 540 "cf-parse.y" /* yacc.c:1646 */ +#line 532 "cf-parse.y" /* yacc.c:1646 */ { _addr = (yyvsp[-3].tok).t; _mask = (yyvsp[-1].tok).i; } -#line 2231 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2232 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 63: -#line 541 "cf-parse.y" /* yacc.c:1646 */ +#line 533 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_RMT, C_KEY, (yyvsp[-1].tok).t); if (is_acl(scanner, _str)) { @@ -2239,29 +2240,29 @@ yyreduce: } free((yyvsp[-1].tok).t); } -#line 2243 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2244 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 64: -#line 548 "cf-parse.y" /* yacc.c:1646 */ +#line 540 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_RMT, C_VIA, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2249 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2250 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 65: -#line 549 "cf-parse.y" /* yacc.c:1646 */ +#line 541 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_RMT, C_VIA, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2255 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2256 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 66: -#line 550 "cf-parse.y" /* yacc.c:1646 */ +#line 542 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_RMT, C_VIA, if_get(scanner, R_RMT, (yyvsp[-1].tok).t)); free((yyvsp[-1].tok).t); } -#line 2261 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2262 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 67: -#line 554 "cf-parse.y" /* yacc.c:1646 */ +#line 546 "cf-parse.y" /* yacc.c:1646 */ { _str = NULL; f_section(scanner, R_RMT, S_RMT); @@ -2269,11 +2270,11 @@ yyreduce: f_section(scanner, R_RMT_ACL, S_ACL); } } -#line 2273 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2274 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 68: -#line 561 "cf-parse.y" /* yacc.c:1646 */ +#line 553 "cf-parse.y" /* yacc.c:1646 */ { _addr = NULL, _port = -1; _mask = -1; f_id(scanner, R_RMT, C_ID, _str); @@ -2282,11 +2283,11 @@ yyreduce: f_val(scanner, R_RMT_ACL, false, "acl_%s\n", _str); } } -#line 2286 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2287 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 69: -#line 569 "cf-parse.y" /* yacc.c:1646 */ +#line 561 "cf-parse.y" /* yacc.c:1646 */ { if (_addr == NULL) { cf_error(scanner, "remote.address not defined"); @@ -2312,423 +2313,423 @@ yyreduce: free(_addr); free(_str); } -#line 2316 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2317 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 70: -#line 597 "cf-parse.y" /* yacc.c:1646 */ +#line 589 "cf-parse.y" /* yacc.c:1646 */ { grp_add(scanner, (yyvsp[0].tok).t); free((yyvsp[0].tok).t); } -#line 2322 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2323 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 74: -#line 607 "cf-parse.y" /* yacc.c:1646 */ +#line 599 "cf-parse.y" /* yacc.c:1646 */ { grp_init(scanner, (yyvsp[0].tok).t); free((yyvsp[0].tok).t); } -#line 2328 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2329 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 77: -#line 616 "cf-parse.y" /* yacc.c:1646 */ +#line 608 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_MASTER, false); acl_start(scanner, ACL_RMT); _str = ""; } -#line 2334 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2335 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 78: -#line 617 "cf-parse.y" /* yacc.c:1646 */ +#line 609 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_ACL, false); acl_start(scanner, ACL_XFR); _str = "acl_"; } -#line 2340 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2341 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 79: -#line 618 "cf-parse.y" /* yacc.c:1646 */ +#line 610 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_ACL, false); acl_start(scanner, ACL_NTF); _str = "acl_"; } -#line 2346 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2347 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 80: -#line 619 "cf-parse.y" /* yacc.c:1646 */ +#line 611 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_NOTIFY, false); acl_start(scanner, ACL_RMT); _str = ""; } -#line 2352 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2353 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 81: -#line 620 "cf-parse.y" /* yacc.c:1646 */ +#line 612 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_ACL, false); acl_start(scanner, ACL_UPD); _str = "acl_"; } -#line 2358 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2359 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 83: -#line 624 "cf-parse.y" /* yacc.c:1646 */ +#line 616 "cf-parse.y" /* yacc.c:1646 */ { acl_next(scanner, (yyvsp[0].tok).t); free((yyvsp[0].tok).t); } -#line 2364 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2365 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 84: -#line 625 "cf-parse.y" /* yacc.c:1646 */ +#line 617 "cf-parse.y" /* yacc.c:1646 */ { acl_next(scanner, (yyvsp[0].tok).t + 1); } -#line 2370 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2371 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 85: -#line 626 "cf-parse.y" /* yacc.c:1646 */ +#line 618 "cf-parse.y" /* yacc.c:1646 */ { acl_next(scanner, (yyvsp[0].tok).t); } -#line 2376 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2377 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 86: -#line 627 "cf-parse.y" /* yacc.c:1646 */ +#line 619 "cf-parse.y" /* yacc.c:1646 */ { acl_next(scanner, (yyvsp[0].tok).t); } -#line 2382 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2383 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 87: -#line 628 "cf-parse.y" /* yacc.c:1646 */ +#line 620 "cf-parse.y" /* yacc.c:1646 */ { acl_next(scanner, (yyvsp[0].tok).t); } -#line 2388 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2389 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 90: -#line 633 "cf-parse.y" /* yacc.c:1646 */ +#line 625 "cf-parse.y" /* yacc.c:1646 */ { acl_end(scanner); } -#line 2394 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2395 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 95: -#line 645 "cf-parse.y" /* yacc.c:1646 */ +#line 637 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); free((yyvsp[0].tok).t); } -#line 2400 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2401 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 96: -#line 646 "cf-parse.y" /* yacc.c:1646 */ +#line 638 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); } -#line 2406 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2407 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 97: -#line 647 "cf-parse.y" /* yacc.c:1646 */ +#line 639 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t + 1); } -#line 2412 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2413 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 98: -#line 648 "cf-parse.y" /* yacc.c:1646 */ +#line 640 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); } -#line 2418 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2419 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 99: -#line 649 "cf-parse.y" /* yacc.c:1646 */ +#line 641 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); } -#line 2424 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2425 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 100: -#line 650 "cf-parse.y" /* yacc.c:1646 */ +#line 642 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); } -#line 2430 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2431 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 101: -#line 651 "cf-parse.y" /* yacc.c:1646 */ +#line 643 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_ZONE, C_DOMAIN, true); f_val(scanner, R_ZONE, false, "%i/%s", (yyvsp[-2].tok).i, (yyvsp[0].tok).t); f_val(scanner, R_ZONE, false, "\n"); free((yyvsp[0].tok).t); } -#line 2441 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2442 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 102: -#line 657 "cf-parse.y" /* yacc.c:1646 */ +#line 649 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_ZONE, C_DOMAIN, (yyvsp[0].tok).t); free((yyvsp[0].tok).t); } -#line 2447 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2448 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 105: -#line 663 "cf-parse.y" /* yacc.c:1646 */ +#line 655 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_ZONE, C_FILE, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2453 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2454 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 106: -#line 664 "cf-parse.y" /* yacc.c:1646 */ +#line 656 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE, C_DISABLE_ANY, (yyvsp[-1].tok).i); } -#line 2459 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2460 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 107: -#line 665 "cf-parse.y" /* yacc.c:1646 */ +#line 657 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE, C_IXFR_DIFF, (yyvsp[-1].tok).i); } -#line 2465 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2466 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 108: -#line 666 "cf-parse.y" /* yacc.c:1646 */ +#line 658 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE, C_SEM_CHECKS, (yyvsp[-1].tok).i); } -#line 2471 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2472 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 109: -#line 667 "cf-parse.y" /* yacc.c:1646 */ +#line 659 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_IXFR_FSLIMIT, (yyvsp[-1].tok).l); } -#line 2477 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2478 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 110: -#line 668 "cf-parse.y" /* yacc.c:1646 */ +#line 660 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_IXFR_FSLIMIT, (yyvsp[-1].tok).i); } -#line 2483 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2484 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 111: -#line 669 "cf-parse.y" /* yacc.c:1646 */ +#line 661 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_NOTIFY_RETRIES, (yyvsp[-1].tok).i); } -#line 2489 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2490 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 112: -#line 670 "cf-parse.y" /* yacc.c:1646 */ +#line 662 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_NOTIFY_TIMEOUT, (yyvsp[-1].tok).i); } -#line 2495 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2496 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 113: -#line 671 "cf-parse.y" /* yacc.c:1646 */ +#line 663 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_ZONEFILE_SYNC, (yyvsp[-1].tok).i); } -#line 2501 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2502 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 114: -#line 672 "cf-parse.y" /* yacc.c:1646 */ +#line 664 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_ZONEFILE_SYNC, (yyvsp[-1].tok).i); } -#line 2507 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2508 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 115: -#line 673 "cf-parse.y" /* yacc.c:1646 */ +#line 665 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_ZONE, C_STORAGE, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2513 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2514 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 116: -#line 674 "cf-parse.y" /* yacc.c:1646 */ +#line 666 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE, C_DNSSEC_ENABLE, (yyvsp[-1].tok).i); } -#line 2519 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2520 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 117: -#line 675 "cf-parse.y" /* yacc.c:1646 */ +#line 667 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_ZONE, C_DNSSEC_KEYDIR, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2525 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2526 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 118: -#line 676 "cf-parse.y" /* yacc.c:1646 */ +#line 668 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_SIG_LIFETIME, (yyvsp[-1].tok).i); } -#line 2531 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2532 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 119: -#line 677 "cf-parse.y" /* yacc.c:1646 */ +#line 669 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE, C_SIG_LIFETIME, (yyvsp[-1].tok).i); } -#line 2537 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2538 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 120: -#line 678 "cf-parse.y" /* yacc.c:1646 */ +#line 670 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_ZONE, C_SERIAL_POLICY, (yyvsp[-1].tok).t); } -#line 2543 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2544 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 121: -#line 679 "cf-parse.y" /* yacc.c:1646 */ +#line 671 "cf-parse.y" /* yacc.c:1646 */ { if (cf_get_extra(scanner)->run == S_FIRST) { cf_warning(scanner, "query module is not yet implemented"); } } -#line 2553 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2554 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 126: -#line 695 "cf-parse.y" /* yacc.c:1646 */ +#line 687 "cf-parse.y" /* yacc.c:1646 */ { f_section(scanner, R_ZONE, S_ZONE); _acl_run = R_ZONE; if (f_section(scanner, R_ZONE_TPL, S_TPL)) { f_id(scanner, R_ZONE_TPL, C_ID, "default"); } } -#line 2564 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2565 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 128: -#line 702 "cf-parse.y" /* yacc.c:1646 */ +#line 694 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE_TPL, C_DISABLE_ANY, (yyvsp[-1].tok).i); } -#line 2570 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2571 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 129: -#line 703 "cf-parse.y" /* yacc.c:1646 */ +#line 695 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE_TPL, C_IXFR_DIFF, (yyvsp[-1].tok).i); } -#line 2576 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2577 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 130: -#line 704 "cf-parse.y" /* yacc.c:1646 */ +#line 696 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE_TPL, C_SEM_CHECKS, (yyvsp[-1].tok).i); } -#line 2582 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2583 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 131: -#line 705 "cf-parse.y" /* yacc.c:1646 */ +#line 697 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_IXFR_FSLIMIT, (yyvsp[-1].tok).l); } -#line 2588 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2589 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 132: -#line 706 "cf-parse.y" /* yacc.c:1646 */ +#line 698 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_IXFR_FSLIMIT, (yyvsp[-1].tok).i); } -#line 2594 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2595 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 133: -#line 707 "cf-parse.y" /* yacc.c:1646 */ +#line 699 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_NOTIFY_RETRIES, (yyvsp[-1].tok).i); } -#line 2600 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2601 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 134: -#line 708 "cf-parse.y" /* yacc.c:1646 */ +#line 700 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_NOTIFY_TIMEOUT, (yyvsp[-1].tok).i); } -#line 2606 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2607 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 135: -#line 709 "cf-parse.y" /* yacc.c:1646 */ +#line 701 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_ZONEFILE_SYNC, (yyvsp[-1].tok).i); } -#line 2612 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2613 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 136: -#line 710 "cf-parse.y" /* yacc.c:1646 */ +#line 702 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_ZONEFILE_SYNC, (yyvsp[-1].tok).i); } -#line 2618 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2619 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 137: -#line 711 "cf-parse.y" /* yacc.c:1646 */ +#line 703 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_ZONE_TPL, C_STORAGE, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2624 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2625 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 138: -#line 712 "cf-parse.y" /* yacc.c:1646 */ +#line 704 "cf-parse.y" /* yacc.c:1646 */ { f_bool(scanner, R_ZONE_TPL, C_DNSSEC_ENABLE, (yyvsp[-1].tok).i); } -#line 2630 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2631 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 139: -#line 713 "cf-parse.y" /* yacc.c:1646 */ +#line 705 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_ZONE_TPL, C_DNSSEC_KEYDIR, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2636 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2637 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 140: -#line 714 "cf-parse.y" /* yacc.c:1646 */ +#line 706 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_SIG_LIFETIME, (yyvsp[-1].tok).i); } -#line 2642 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2643 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 141: -#line 715 "cf-parse.y" /* yacc.c:1646 */ +#line 707 "cf-parse.y" /* yacc.c:1646 */ { f_int(scanner, R_ZONE_TPL, C_SIG_LIFETIME, (yyvsp[-1].tok).i); } -#line 2648 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2649 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 142: -#line 716 "cf-parse.y" /* yacc.c:1646 */ +#line 708 "cf-parse.y" /* yacc.c:1646 */ { f_str(scanner, R_ZONE_TPL, C_SERIAL_POLICY, (yyvsp[-1].tok).t); } -#line 2654 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2655 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 143: -#line 717 "cf-parse.y" /* yacc.c:1646 */ +#line 709 "cf-parse.y" /* yacc.c:1646 */ { if (cf_get_extra(scanner)->run == S_FIRST) { cf_warning(scanner, "query module is not yet implemented"); } } -#line 2664 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2665 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 146: -#line 726 "cf-parse.y" /* yacc.c:1646 */ +#line 718 "cf-parse.y" /* yacc.c:1646 */ { if (_str == NULL) _str = (yyvsp[-1].tok).t; } -#line 2670 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2671 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 147: -#line 727 "cf-parse.y" /* yacc.c:1646 */ +#line 719 "cf-parse.y" /* yacc.c:1646 */ { if (_str == NULL) _str = (yyvsp[-1].tok).t; } -#line 2676 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2677 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 149: -#line 731 "cf-parse.y" /* yacc.c:1646 */ +#line 723 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_LOG, (yyvsp[0].tok).t, false); _str = NULL; } -#line 2682 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2683 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 150: -#line 732 "cf-parse.y" /* yacc.c:1646 */ +#line 724 "cf-parse.y" /* yacc.c:1646 */ { f_val(scanner, R_LOG, false, "%s\n", _str); } -#line 2688 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2689 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 151: -#line 736 "cf-parse.y" /* yacc.c:1646 */ +#line 728 "cf-parse.y" /* yacc.c:1646 */ { f_id(scanner, R_LOG, C_TO, (yyvsp[0].tok).t); } -#line 2694 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2695 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 152: -#line 740 "cf-parse.y" /* yacc.c:1646 */ +#line 732 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_LOG, C_TO, true); f_val(scanner, R_LOG, true, "%s", (yyvsp[0].tok).t); free((yyvsp[0].tok).t); f_val(scanner, R_LOG, false, "\n"); } -#line 2704 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2705 "cf-parse.tab.c" /* yacc.c:1646 */ break; case 156: -#line 753 "cf-parse.y" /* yacc.c:1646 */ +#line 745 "cf-parse.y" /* yacc.c:1646 */ { f_section(scanner, R_LOG, S_LOG); } -#line 2710 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2711 "cf-parse.tab.c" /* yacc.c:1646 */ break; - case 159: -#line 762 "cf-parse.y" /* yacc.c:1646 */ - { f_name(scanner, R_CTL, C_ACL, false); acl_start(scanner, ACL_CTL); _str = "acl_"; } -#line 2716 "cf-parse.tab.c" /* yacc.c:1646 */ + case 160: +#line 754 "cf-parse.y" /* yacc.c:1646 */ + { free((yyvsp[0].tok).t); } +#line 2717 "cf-parse.tab.c" /* yacc.c:1646 */ break; - case 160: -#line 766 "cf-parse.y" /* yacc.c:1646 */ + case 169: +#line 771 "cf-parse.y" /* yacc.c:1646 */ { f_section(scanner, R_CTL, S_CTL); _acl_run = R_CTL; } -#line 2722 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2723 "cf-parse.tab.c" /* yacc.c:1646 */ break; - case 161: -#line 767 "cf-parse.y" /* yacc.c:1646 */ + case 170: +#line 772 "cf-parse.y" /* yacc.c:1646 */ { f_name(scanner, R_CTL, C_LISTEN, false); _addr = NULL, _port = -1; } -#line 2728 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2729 "cf-parse.tab.c" /* yacc.c:1646 */ break; - case 162: -#line 768 "cf-parse.y" /* yacc.c:1646 */ + case 171: +#line 773 "cf-parse.y" /* yacc.c:1646 */ { if (_addr == NULL) { cf_error(scanner, "control.listen address not defined"); @@ -2739,17 +2740,17 @@ yyreduce: } free(_addr); } -#line 2743 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2744 "cf-parse.tab.c" /* yacc.c:1646 */ break; - case 163: -#line 778 "cf-parse.y" /* yacc.c:1646 */ + case 172: +#line 783 "cf-parse.y" /* yacc.c:1646 */ { f_quote(scanner, R_CTL, C_LISTEN, (yyvsp[-1].tok).t); free((yyvsp[-1].tok).t); } -#line 2749 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2750 "cf-parse.tab.c" /* yacc.c:1646 */ break; -#line 2753 "cf-parse.tab.c" /* yacc.c:1646 */ +#line 2754 "cf-parse.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2977,5 +2978,5 @@ yyreturn: #endif return yyresult; } -#line 784 "cf-parse.y" /* yacc.c:1906 */ +#line 789 "cf-parse.y" /* yacc.c:1906 */ diff --git a/src/utils/knot1to2/cf-parse.tab.h b/src/utils/knot1to2/cf-parse.tab.h index 585e0b5fdbce59022da9931f33eacf93cce04831..aadaf95732d38784a6ca84c76f199db907b66bbe 100644 --- a/src/utils/knot1to2/cf-parse.tab.h +++ b/src/utils/knot1to2/cf-parse.tab.h @@ -119,7 +119,7 @@ extern int cf_debug; typedef union YYSTYPE YYSTYPE; union YYSTYPE { -#line 361 "cf-parse.y" /* yacc.c:1909 */ +#line 353 "cf-parse.y" /* yacc.c:1909 */ struct { char *t; diff --git a/src/utils/knot1to2/cf-parse.y b/src/utils/knot1to2/cf-parse.y index 88814a74365c65212a40244e8e7bec5dbd943e3a..9e90840b88be0766f07d8dd8f3760d798a0b9cd5 100644 --- a/src/utils/knot1to2/cf-parse.y +++ b/src/utils/knot1to2/cf-parse.y @@ -199,7 +199,6 @@ typedef enum { ACL_XFR, ACL_NTF, ACL_UPD, - ACL_CTL } acl_type_t; static void acl_start(void *scanner, acl_type_t type) @@ -212,7 +211,6 @@ static void acl_start(void *scanner, acl_type_t type) case ACL_XFR: extra->current_trie = extra->share->acl_xfer; break; case ACL_NTF: extra->current_trie = extra->share->acl_notify; break; case ACL_UPD: extra->current_trie = extra->share->acl_update; break; - case ACL_CTL: extra->current_trie = extra->share->acl_control; break; } } @@ -285,8 +283,7 @@ static bool is_acl(void *scanner, const char *str) { return hattrie_tryget(extra->share->acl_xfer, str, strlen(str)) != NULL || hattrie_tryget(extra->share->acl_notify, str, strlen(str)) != NULL || - hattrie_tryget(extra->share->acl_update, str, strlen(str)) != NULL || - hattrie_tryget(extra->share->acl_control, str, strlen(str)) != NULL; + hattrie_tryget(extra->share->acl_update, str, strlen(str)) != NULL; } static bool have_acl(void *scanner) { @@ -294,8 +291,7 @@ static bool have_acl(void *scanner) { return (hattrie_weight(extra->share->acl_xfer) + hattrie_weight(extra->share->acl_notify) + - hattrie_weight(extra->share->acl_update) + - hattrie_weight(extra->share->acl_control)) > 0; + hattrie_weight(extra->share->acl_update)) > 0; } static char *acl_actions(void *scanner, const char *str) { @@ -318,10 +314,6 @@ static char *acl_actions(void *scanner, const char *str) { strlcat(actions, _first ? "" : ", ", sizeof(actions)); _first = false; strlcat(actions, "update", sizeof(actions)); } - if (hattrie_tryget(extra->share->acl_control, str, strlen(str)) != NULL) { - strlcat(actions, _first ? "" : ", ", sizeof(actions)); _first = false; - strlcat(actions, "control", sizeof(actions)); - } strlcat(actions, "]", sizeof(actions)); @@ -758,8 +750,21 @@ ctl_listen_start: LISTEN_ON ; +ctl_allow_item: + | TEXT { free($1.t); } + | LOG_SRC + | LOG + | LOG_LEVEL + | CONTROL + ; + +ctl_allow_list: + | ctl_allow_list ctl_allow_item ',' + | ctl_allow_list ctl_allow_item ';' + ; + ctl_allow_start: - ALLOW { f_name(scanner, R_CTL, C_ACL, false); acl_start(scanner, ACL_CTL); _str = "acl_"; } + ALLOW ; control: @@ -776,7 +781,7 @@ control: free(_addr); } | control ctl_listen_start TEXT ';' { f_quote(scanner, R_CTL, C_LISTEN, $3.t); free($3.t); } - | control ctl_allow_start zone_acl_list + | control ctl_allow_start ctl_allow_list ; conf: ';' | system '}' | interfaces '}' | keys '}' | remotes '}' | groups '}' | zones '}' | log '}' | control '}'; diff --git a/src/utils/knot1to2/extra.h b/src/utils/knot1to2/extra.h index 7dbe25cae7005b09d76ac64dbd33ba1edcfb03df..1aa028e25c78a1aae34a91fbe145080beeec5164 100644 --- a/src/utils/knot1to2/extra.h +++ b/src/utils/knot1to2/extra.h @@ -31,7 +31,6 @@ typedef struct { hattrie_t *acl_xfer; hattrie_t *acl_notify; hattrie_t *acl_update; - hattrie_t *acl_control; } share_t; /*! diff --git a/src/utils/knot1to2/main.c b/src/utils/knot1to2/main.c index fb7cf8b9961d5918b8764567a4d4401b1fd2c615..cc7b864e730ba6a29dc9b958da2f746cd81251c1 100644 --- a/src/utils/knot1to2/main.c +++ b/src/utils/knot1to2/main.c @@ -80,7 +80,6 @@ static int convert(const char *file_out, const char *file_in) .acl_xfer = hattrie_create(), .acl_notify = hattrie_create(), .acl_update = hattrie_create(), - .acl_control = hattrie_create(), }; // Parse the input file multiple times to get some context. @@ -115,7 +114,6 @@ static int convert(const char *file_out, const char *file_in) hattrie_free(share.acl_xfer); hattrie_free(share.acl_notify); hattrie_free(share.acl_update); - hattrie_free(share.acl_control); fclose(out);