Commit 0b6e050b authored by Daniel Salzman's avatar Daniel Salzman

knot1to2: fix memory leaks

parent 8863c92d
......@@ -1564,16 +1564,17 @@ case 69:
YY_RULE_SETUP
#line 151 "cf-lex.l"
{
lval.t = "unixtime";
if (strcmp(yytext, "increment") == 0) {
lval.t = "increment";
} else {
lval.t = "unixtime";
}
return SERIAL_POLICY_VAL;
}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 159 "cf-lex.l"
#line 160 "cf-lex.l"
{
lval.t = yytext;
lval.i = 0;
......@@ -1585,12 +1586,12 @@ YY_RULE_SETUP
YY_BREAK
case 71:
YY_RULE_SETUP
#line 168 "cf-lex.l"
#line 169 "cf-lex.l"
BEGIN(include);
YY_BREAK
case 72:
YY_RULE_SETUP
#line 170 "cf-lex.l"
#line 171 "cf-lex.l"
{
size_t mpos = strlen(yytext) - 1;
char multiplier = yytext[mpos];
......@@ -1615,7 +1616,7 @@ YY_RULE_SETUP
YY_BREAK
case 73:
YY_RULE_SETUP
#line 192 "cf-lex.l"
#line 193 "cf-lex.l"
{
size_t mpos = strlen(yytext) - 1;
char multiplier = yytext[mpos];
......@@ -1639,7 +1640,7 @@ YY_RULE_SETUP
YY_BREAK
case 74:
YY_RULE_SETUP
#line 213 "cf-lex.l"
#line 214 "cf-lex.l"
{
lval.i = atol(yytext);
return NUM;
......@@ -1647,7 +1648,7 @@ YY_RULE_SETUP
YY_BREAK
case 75:
YY_RULE_SETUP
#line 218 "cf-lex.l"
#line 219 "cf-lex.l"
{
unsigned char buf[sizeof(struct in_addr)];
if (inet_pton(AF_INET, yytext, buf)) {
......@@ -1659,7 +1660,7 @@ YY_RULE_SETUP
YY_BREAK
case 76:
YY_RULE_SETUP
#line 227 "cf-lex.l"
#line 228 "cf-lex.l"
{
unsigned char buf[sizeof(struct in6_addr)];
yytext[strlen(yytext)-1] = '\0';
......@@ -1672,7 +1673,7 @@ YY_RULE_SETUP
YY_BREAK
case 77:
YY_RULE_SETUP
#line 237 "cf-lex.l"
#line 238 "cf-lex.l"
{
unsigned char buf[sizeof(struct in6_addr)];
if (inet_pton(AF_INET6, yytext, buf)) {
......@@ -1684,37 +1685,37 @@ YY_RULE_SETUP
YY_BREAK
case 78:
YY_RULE_SETUP
#line 246 "cf-lex.l"
#line 247 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 79:
YY_RULE_SETUP
#line 247 "cf-lex.l"
#line 248 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 80:
YY_RULE_SETUP
#line 248 "cf-lex.l"
#line 249 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 81:
YY_RULE_SETUP
#line 249 "cf-lex.l"
#line 250 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 82:
YY_RULE_SETUP
#line 250 "cf-lex.l"
#line 251 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 83:
YY_RULE_SETUP
#line 251 "cf-lex.l"
#line 252 "cf-lex.l"
{ lval.t = strdup(yytext); return TSIG_ALGO_NAME; }
YY_BREAK
case 84:
YY_RULE_SETUP
#line 253 "cf-lex.l"
#line 254 "cf-lex.l"
{
yytext[yyleng-1] = 0;
lval.t = strdup(yytext + 1);
......@@ -1724,12 +1725,12 @@ YY_RULE_SETUP
case 85:
/* rule 85 can match eol */
YY_RULE_SETUP
#line 259 "cf-lex.l"
#line 260 "cf-lex.l"
cf_error(yyscanner, "Unterminated string.");
YY_BREAK
case 86:
YY_RULE_SETUP
#line 261 "cf-lex.l"
#line 262 "cf-lex.l"
{
lval.t = strdup(yytext);
return TEXT /* Last resort, alphanumeric word. */;
......@@ -1737,12 +1738,12 @@ YY_RULE_SETUP
YY_BREAK
case 87:
YY_RULE_SETUP
#line 266 "cf-lex.l"
#line 267 "cf-lex.l"
/* Optional : in assignments. */;
YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(include):
#line 268 "cf-lex.l"
#line 269 "cf-lex.l"
{
conf_includes_remove(yyextra->includes);
......@@ -1756,12 +1757,12 @@ case YY_STATE_EOF(include):
case 88:
/* rule 88 can match eol */
YY_RULE_SETUP
#line 278 "cf-lex.l"
#line 279 "cf-lex.l"
YY_BREAK
case 89:
YY_RULE_SETUP
#line 279 "cf-lex.l"
#line 280 "cf-lex.l"
{
BEGIN(INITIAL);
......@@ -1869,15 +1870,15 @@ YY_RULE_SETUP
case 90:
/* rule 90 can match eol */
YY_RULE_SETUP
#line 385 "cf-lex.l"
#line 386 "cf-lex.l"
cf_error(yyscanner, "Unterminated string.");
YY_BREAK
case 91:
YY_RULE_SETUP
#line 387 "cf-lex.l"
#line 388 "cf-lex.l"
ECHO;
YY_BREAK
#line 1881 "cf-lex.c"
#line 1882 "cf-lex.c"
case YY_END_OF_BUFFER:
{
......@@ -3011,7 +3012,7 @@ void cf_free (void * ptr , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
#line 387 "cf-lex.l"
#line 388 "cf-lex.l"
......@@ -75,83 +75,84 @@ BLANK [ \t\n]
\#.*\n /* Ignore comments */;
{BLANK}+ /* Ignore whitespace */;
[\=\!\$\%\^\&\*\(\)\/\+\-\@\{\}\;\,] { return yytext[0]; }
system { lval.t = yytext; return SYSTEM; }
identity { lval.t = yytext; return IDENTITY; }
hostname { lval.t = yytext; return HOSTNAME; }
version { lval.t = yytext; return SVERSION; }
nsid { lval.t = yytext; return NSID; }
max-udp-payload { lval.t = yytext; return MAX_UDP_PAYLOAD; }
storage { lval.t = yytext; return STORAGE; }
key { lval.t = yytext; return KEY; }
keys { lval.t = yytext; return KEYS; }
remotes { lval.t = yytext; return REMOTES; }
groups { lval.t = yytext; return GROUPS; }
zones { lval.t = yytext; return ZONES; }
file { lval.t = yytext; return FILENAME; }
disable-any { lval.t = yytext; return DISABLE_ANY; }
semantic-checks { lval.t = yytext; return SEMANTIC_CHECKS; }
notify-retries { lval.t = yytext; return NOTIFY_RETRIES; }
notify-timeout { lval.t = yytext; return NOTIFY_TIMEOUT; }
zonefile-sync { lval.t = yytext; return DBSYNC_TIMEOUT; }
ixfr-fslimit { lval.t = yytext; return IXFR_FSLIMIT; }
xfr-in { lval.t = yytext; return XFR_IN; }
xfr-out { lval.t = yytext; return XFR_OUT; }
update-in { lval.t = yytext; return UPDATE_IN; }
notify-in { lval.t = yytext; return NOTIFY_IN; }
notify-out { lval.t = yytext; return NOTIFY_OUT; }
workers { lval.t = yytext; return WORKERS; }
background-workers { lval.t = yytext; return BACKGROUND_WORKERS; }
asynchronous-start { lval.t = yytext; return ASYNC_START; }
user { lval.t = yytext; return USER; }
pidfile { lval.t = yytext; return PIDFILE; }
rundir { lval.t = yytext; return RUNDIR; }
system { lval.t = yytext; return SYSTEM; }
identity { lval.t = yytext; return IDENTITY; }
hostname { lval.t = yytext; return HOSTNAME; }
version { lval.t = yytext; return SVERSION; }
nsid { lval.t = yytext; return NSID; }
max-udp-payload { lval.t = yytext; return MAX_UDP_PAYLOAD; }
storage { lval.t = yytext; return STORAGE; }
key { lval.t = yytext; return KEY; }
keys { lval.t = yytext; return KEYS; }
remotes { lval.t = yytext; return REMOTES; }
groups { lval.t = yytext; return GROUPS; }
zones { lval.t = yytext; return ZONES; }
file { lval.t = yytext; return FILENAME; }
disable-any { lval.t = yytext; return DISABLE_ANY; }
semantic-checks { lval.t = yytext; return SEMANTIC_CHECKS; }
notify-retries { lval.t = yytext; return NOTIFY_RETRIES; }
notify-timeout { lval.t = yytext; return NOTIFY_TIMEOUT; }
zonefile-sync { lval.t = yytext; return DBSYNC_TIMEOUT; }
ixfr-fslimit { lval.t = yytext; return IXFR_FSLIMIT; }
xfr-in { lval.t = yytext; return XFR_IN; }
xfr-out { lval.t = yytext; return XFR_OUT; }
update-in { lval.t = yytext; return UPDATE_IN; }
notify-in { lval.t = yytext; return NOTIFY_IN; }
notify-out { lval.t = yytext; return NOTIFY_OUT; }
workers { lval.t = yytext; return WORKERS; }
background-workers { lval.t = yytext; return BACKGROUND_WORKERS; }
asynchronous-start { lval.t = yytext; return ASYNC_START; }
user { lval.t = yytext; return USER; }
pidfile { lval.t = yytext; return PIDFILE; }
rundir { lval.t = yytext; return RUNDIR; }
ixfr-from-differences { lval.t = yytext; return BUILD_DIFFS; }
serial-policy { lval.t = yytext; return SERIAL_POLICY; }
max-conn-idle { lval.t = yytext; return MAX_CONN_IDLE; }
max-conn-handshake { lval.t = yytext; return MAX_CONN_HS; }
max-conn-reply { lval.t = yytext; return MAX_CONN_REPLY; }
max-tcp-clients { lval.t = yytext; return MAX_TCP_CLIENTS; }
rate-limit { lval.t = yytext; return RATE_LIMIT; }
rate-limit-size { lval.t = yytext; return RATE_LIMIT_SIZE; }
rate-limit-slip { lval.t = yytext; return RATE_LIMIT_SLIP; }
transfers { lval.t = yytext; return TRANSFERS; }
dnssec-enable { lval.t = yytext; return DNSSEC_ENABLE; }
dnssec-keydir { lval.t = yytext; return DNSSEC_KEYDIR; }
signature-lifetime { lval.t = yytext; return SIGNATURE_LIFETIME; }
query_module { lval.t = yytext; return QUERY_MODULE; }
interfaces { lval.t = yytext; return INTERFACES; }
address { lval.t = yytext; return ADDRESS; }
port { lval.t = yytext; return PORT; }
via { lval.t = yytext; return VIA; }
control { lval.t = yytext; return CONTROL; }
allow { lval.t = yytext; return ALLOW; }
listen-on { lval.t = yytext; return LISTEN_ON; }
log { lval.t = yytext; return LOG; }
any { lval.t = C_ANY; return LOG_SRC; }
server { lval.t = C_SRV; return LOG_SRC; }
zone { lval.t = C_ZONE; return LOG_SRC; }
stdout { lval.t = yytext; return LOG_DEST; }
stderr { lval.t = yytext; return LOG_DEST; }
syslog { lval.t = yytext; return LOG_DEST; }
debug { lval.t = "debug"; return LOG_LEVEL; }
info { lval.t = "info"; return LOG_LEVEL; }
notice { lval.t = "notice"; return LOG_LEVEL; }
warning { lval.t = "warning"; return LOG_LEVEL; }
error { lval.t = "error"; return LOG_LEVEL; }
critical { lval.t = "critical"; return LOG_LEVEL; }
all { lval.t = "info"; return LOG_LEVEL; }
serial-policy { lval.t = yytext; return SERIAL_POLICY; }
max-conn-idle { lval.t = yytext; return MAX_CONN_IDLE; }
max-conn-handshake { lval.t = yytext; return MAX_CONN_HS; }
max-conn-reply { lval.t = yytext; return MAX_CONN_REPLY; }
max-tcp-clients { lval.t = yytext; return MAX_TCP_CLIENTS; }
rate-limit { lval.t = yytext; return RATE_LIMIT; }
rate-limit-size { lval.t = yytext; return RATE_LIMIT_SIZE; }
rate-limit-slip { lval.t = yytext; return RATE_LIMIT_SLIP; }
transfers { lval.t = yytext; return TRANSFERS; }
dnssec-enable { lval.t = yytext; return DNSSEC_ENABLE; }
dnssec-keydir { lval.t = yytext; return DNSSEC_KEYDIR; }
signature-lifetime { lval.t = yytext; return SIGNATURE_LIFETIME; }
query_module { lval.t = yytext; return QUERY_MODULE; }
interfaces { lval.t = yytext; return INTERFACES; }
address { lval.t = yytext; return ADDRESS; }
port { lval.t = yytext; return PORT; }
via { lval.t = yytext; return VIA; }
control { lval.t = yytext; return CONTROL; }
allow { lval.t = yytext; return ALLOW; }
listen-on { lval.t = yytext; return LISTEN_ON; }
log { lval.t = yytext; return LOG; }
any { lval.t = C_ANY; return LOG_SRC; }
server { lval.t = C_SRV; return LOG_SRC; }
zone { lval.t = C_ZONE; return LOG_SRC; }
stdout { lval.t = yytext; return LOG_DEST; }
stderr { lval.t = yytext; return LOG_DEST; }
syslog { lval.t = yytext; return LOG_DEST; }
debug { lval.t = "debug"; return LOG_LEVEL; }
info { lval.t = "info"; return LOG_LEVEL; }
notice { lval.t = "notice"; return LOG_LEVEL; }
warning { lval.t = "warning"; return LOG_LEVEL; }
error { lval.t = "error"; return LOG_LEVEL; }
critical { lval.t = "critical"; return LOG_LEVEL; }
all { lval.t = "info"; return LOG_LEVEL; }
increment|unixtime {
lval.t = "unixtime";
if (strcmp(yytext, "increment") == 0) {
lval.t = "increment";
} else {
lval.t = "unixtime";
}
return SERIAL_POLICY_VAL;
}
......
This diff is collapsed.
......@@ -377,12 +377,12 @@ conf_entries:
;
interface_start:
| TEXT
| REMOTES
| LOG_SRC
| LOG
| LOG_LEVEL
| CONTROL
| TEXT { free($1.t); }
| REMOTES { free($1.t); }
| LOG_SRC { free($1.t); }
| LOG { free($1.t); }
| LOG_LEVEL { free($1.t); }
| CONTROL { free($1.t); }
;
interface:
......@@ -410,15 +410,15 @@ interfaces:
system:
SYSTEM '{' { f_section(scanner, R_SYS, S_SRV); }
| system SVERSION TEXT ';' { f_quote(scanner, R_SYS, C_VERSION, $3.t); }
| system SVERSION TEXT ';' { f_quote(scanner, R_SYS, C_VERSION, $3.t); free($3.t); }
| system SVERSION BOOL ';' { f_auto_str(scanner, R_SYS, C_VERSION, $3.i); }
| system IDENTITY TEXT ';' { f_quote(scanner, R_SYS, C_IDENT, $3.t); }
| system IDENTITY TEXT ';' { f_quote(scanner, R_SYS, C_IDENT, $3.t); free($3.t); }
| system IDENTITY BOOL ';' { f_auto_str(scanner, R_SYS, C_IDENT, $3.i); }
| system NSID TEXT ';' { f_quote(scanner, R_SYS, C_NSID, $3.t); }
| system NSID TEXT ';' { f_quote(scanner, R_SYS, C_NSID, $3.t); free($3.t); }
| system NSID BOOL ';' { f_auto_str(scanner, R_SYS, C_NSID, $3.i); }
| system MAX_UDP_PAYLOAD NUM ';' { f_int(scanner, R_SYS, C_MAX_UDP_PAYLOAD, $3.i); }
| system RUNDIR TEXT ';' { f_quote(scanner, R_SYS, C_RUNDIR, $3.t); }
| system PIDFILE TEXT ';' { f_quote(scanner, R_SYS, C_PIDFILE, $3.t); }
| system RUNDIR TEXT ';' { f_quote(scanner, R_SYS, C_RUNDIR, $3.t); free($3.t); }
| system PIDFILE TEXT ';' { f_quote(scanner, R_SYS, C_PIDFILE, $3.t); free($3.t); }
| system WORKERS NUM ';' { f_int(scanner, R_SYS, C_WORKERS, $3.i); }
| system BACKGROUND_WORKERS NUM ';' { f_int(scanner, R_SYS, C_BG_WORKERS, $3.i); }
| system ASYNC_START BOOL ';' { f_bool(scanner, R_SYS, C_ASYNC_START, $3.i); }
......@@ -437,19 +437,23 @@ system:
*sep = ':';
}
f_str(scanner, R_SYS, C_USER, $3.t);
free($3.t);
}
| system HOSTNAME TEXT ';' {
cf_warning(scanner, "option 'system.hostname' is deprecated, "
"use 'system.identity' instead");
free($3.t);
}
| system STORAGE TEXT ';' {
cf_warning(scanner, "option 'system.storage' was relocated, "
"use 'zones.storage' instead");
free($3.t);
}
| system KEY TSIG_ALGO_NAME TEXT ';' {
free($3.t);
cf_warning(scanner, "option 'system.key' is deprecated and "
"it has no effect");
free($3.t);
}
;
......@@ -458,9 +462,9 @@ keys:
f_section(scanner, R_KEY, S_KEY);
}
| keys TEXT TSIG_ALGO_NAME TEXT ';' {
f_id(scanner, R_KEY, C_ID, $2.t);
f_id(scanner, R_KEY, C_ID, $2.t); free($2.t);
f_str(scanner, R_KEY, C_ALG, $3.t); free($3.t);
f_quote(scanner, R_KEY, C_SECRET, $4.t);
f_quote(scanner, R_KEY, C_SECRET, $4.t); free($4.t);
}
;
......@@ -483,6 +487,7 @@ remote:
| remote KEY TEXT ';' {
f_str(scanner, R_RMT, C_KEY, $3.t);
f_str(scanner, R_RMT_ACL, C_KEY, $3.t);
free($3.t);
}
| remote VIA IPA ';' { f_str(scanner, R_RMT, C_VIA, $3.t); }
| remote VIA IPA6 ';' { f_str(scanner, R_RMT, C_VIA, $3.t); }
......@@ -494,6 +499,7 @@ remote:
remotes:
REMOTES '{' {
_str = NULL;
if (have_remote(scanner)) {
f_section(scanner, R_RMT, S_RMT);
}
......@@ -535,6 +541,8 @@ remotes:
f_name(scanner, R_RMT_ACL, C_ACTION, false);
f_val(scanner, R_RMT_ACL, false, "%s\n", acl_actions(scanner, _str));
}
free(_addr);
free(_str);
}
;
......@@ -569,11 +577,11 @@ zone_acl_start:
;
zone_acl_item:
| TEXT { acl_next(scanner, $1.t); }
| LOG_SRC { acl_next(scanner, $1.t); }
| LOG { acl_next(scanner, $1.t); }
| LOG_LEVEL { acl_next(scanner, $1.t); }
| CONTROL { acl_next(scanner, $1.t); }
| TEXT { acl_next(scanner, $1.t); free($1.t); }
| LOG_SRC { acl_next(scanner, $1.t); free($1.t); }
| LOG { acl_next(scanner, $1.t); free($1.t); }
| LOG_LEVEL { acl_next(scanner, $1.t); free($1.t); }
| CONTROL { acl_next(scanner, $1.t); free($1.t); }
;
zone_acl_list:
......@@ -590,24 +598,25 @@ query_module_list:
;
zone_start:
| USER { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| REMOTES { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| LOG_SRC { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| LOG { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| LOG_LEVEL { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| CONTROL { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| USER { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| REMOTES { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| LOG_SRC { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| LOG { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| LOG_LEVEL { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| CONTROL { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
| NUM '/' TEXT {
f_name(scanner, R_ZONE, C_DOMAIN, true);
f_val(scanner, R_ZONE, false, "%i/%s", $1.i, $3.t);
f_val(scanner, R_ZONE, false, "\n");
free($3.t);
}
| TEXT { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); }
| TEXT { f_id(scanner, R_ZONE, C_DOMAIN, $1.t); free($1.t); }
;
zone:
zone_start '{'
| zone zone_acl_start zone_acl_list
| zone FILENAME TEXT ';' { f_quote(scanner, R_ZONE, C_FILE, $3.t); }
| zone FILENAME TEXT ';' { f_quote(scanner, R_ZONE, C_FILE, $3.t); free($3.t); }
| zone DISABLE_ANY BOOL ';' { f_bool(scanner, R_ZONE, C_DISABLE_ANY, $3.i); }
| zone BUILD_DIFFS BOOL ';' { f_bool(scanner, R_ZONE, C_IXFR_DIFF, $3.i); }
| zone SEMANTIC_CHECKS BOOL ';' { f_bool(scanner, R_ZONE, C_SEM_CHECKS, $3.i); }
......@@ -617,9 +626,9 @@ zone:
| zone NOTIFY_TIMEOUT NUM ';' { f_int(scanner, R_ZONE, C_NOTIFY_TIMEOUT, $3.i); }
| zone DBSYNC_TIMEOUT NUM ';' { f_int(scanner, R_ZONE, C_ZONEFILE_SYNC, $3.i); }
| zone DBSYNC_TIMEOUT INTERVAL ';' { f_int(scanner, R_ZONE, C_ZONEFILE_SYNC, $3.i); }
| zone STORAGE TEXT ';' { f_quote(scanner, R_ZONE, C_STORAGE, $3.t); }
| zone STORAGE TEXT ';' { f_quote(scanner, R_ZONE, C_STORAGE, $3.t); free($3.t); }
| zone DNSSEC_ENABLE BOOL ';' { f_bool(scanner, R_ZONE, C_DNSSEC_ENABLE, $3.i); }
| zone DNSSEC_KEYDIR TEXT ';' { f_quote(scanner, R_ZONE, C_DNSSEC_KEYDIR, $3.t); }
| zone DNSSEC_KEYDIR TEXT ';' { f_quote(scanner, R_ZONE, C_DNSSEC_KEYDIR, $3.t); free($3.t); }
| zone SIGNATURE_LIFETIME NUM ';' { f_int(scanner, R_ZONE, C_SIG_LIFETIME, $3.i); }
| zone SIGNATURE_LIFETIME INTERVAL ';' { f_int(scanner, R_ZONE, C_SIG_LIFETIME, $3.i); }
| zone SERIAL_POLICY SERIAL_POLICY_VAL ';' { f_str(scanner, R_ZONE, C_SERIAL_POLICY, $3.t); }
......@@ -654,9 +663,9 @@ zones:
| zones NOTIFY_TIMEOUT NUM ';' { f_int(scanner, R_ZONE_TPL, C_NOTIFY_TIMEOUT, $3.i); }
| zones DBSYNC_TIMEOUT NUM ';' { f_int(scanner, R_ZONE_TPL, C_ZONEFILE_SYNC, $3.i); }
| zones DBSYNC_TIMEOUT INTERVAL ';' { f_int(scanner, R_ZONE_TPL, C_ZONEFILE_SYNC, $3.i); }
| zones STORAGE TEXT ';' { f_quote(scanner, R_ZONE_TPL, C_STORAGE, $3.t); }
| zones STORAGE TEXT ';' { f_quote(scanner, R_ZONE_TPL, C_STORAGE, $3.t); free($3.t); }
| zones DNSSEC_ENABLE BOOL ';' { f_bool(scanner, R_ZONE_TPL, C_DNSSEC_ENABLE, $3.i); }
| zones DNSSEC_KEYDIR TEXT ';' { f_quote(scanner, R_ZONE_TPL, C_DNSSEC_KEYDIR, $3.t); }
| zones DNSSEC_KEYDIR TEXT ';' { f_quote(scanner, R_ZONE_TPL, C_DNSSEC_KEYDIR, $3.t); free($3.t); }
| zones SIGNATURE_LIFETIME NUM ';' { f_int(scanner, R_ZONE_TPL, C_SIG_LIFETIME, $3.i); }
| zones SIGNATURE_LIFETIME INTERVAL ';' { f_int(scanner, R_ZONE_TPL, C_SIG_LIFETIME, $3.i); }
| zones SERIAL_POLICY SERIAL_POLICY_VAL ';' { f_str(scanner, R_ZONE_TPL, C_SERIAL_POLICY, $3.t); }
......@@ -690,6 +699,7 @@ log_file:
f_name(scanner, R_LOG, C_TO, true);
f_val(scanner, R_LOG, true, "%s", $2.t);
f_val(scanner, R_LOG, false, "\n");
free($2.t);
}
;
......@@ -722,8 +732,9 @@ control:
} else {
f_val(scanner, R_CTL, false, "%s@%i\n", _addr, _port);
}
free(_addr);
}
| control ctl_listen_start TEXT ';' { f_quote(scanner, R_CTL, C_LISTEN, $3.t); }
| control ctl_listen_start TEXT ';' { f_quote(scanner, R_CTL, C_LISTEN, $3.t); free($3.t); }
| control ctl_allow_start zone_acl_list
;
......
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