Skip to content

Commit

Permalink
core: added core parameter dns_cache_rec_pref
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Mititelu authored and miconda committed Apr 21, 2015
1 parent 69ebc55 commit 0d4d530
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cfg.lex
Expand Up @@ -378,6 +378,7 @@ DNS_CACHE_MAX_TTL dns_cache_max_ttl
DNS_CACHE_MEM dns_cache_mem
DNS_CACHE_GC_INT dns_cache_gc_interval
DNS_CACHE_DEL_NONEXP dns_cache_del_nonexp|dns_cache_delete_nonexpired
DNS_CACHE_REC_PREF dns_cache_rec_pref
/* ipv6 auto bind */
AUTO_BIND_IPV6 auto_bind_ipv6
/* blacklist */
Expand Down Expand Up @@ -778,6 +779,8 @@ IMPORTFILE "import_file"
return DNS_CACHE_GC_INT; }
<INITIAL>{DNS_CACHE_DEL_NONEXP} { count(); yylval.strval=yytext;
return DNS_CACHE_DEL_NONEXP; }
<INITIAL>{DNS_CACHE_REC_PREF} { count(); yylval.strval=yytext;
return DNS_CACHE_REC_PREF; }
<INITIAL>{AUTO_BIND_IPV6} { count(); yylval.strval=yytext;
return AUTO_BIND_IPV6; }
<INITIAL>{DST_BLST_INIT} { count(); yylval.strval=yytext;
Expand Down
3 changes: 3 additions & 0 deletions cfg.y
Expand Up @@ -425,6 +425,7 @@ extern char *default_routename;
%token DNS_CACHE_MEM
%token DNS_CACHE_GC_INT
%token DNS_CACHE_DEL_NONEXP
%token DNS_CACHE_REC_PREF

/* ipv6 auto bind */
%token AUTO_BIND_IPV6
Expand Down Expand Up @@ -899,6 +900,8 @@ assign_stm:
| DNS_CACHE_GC_INT error { yyerror("boolean value expected"); }
| DNS_CACHE_DEL_NONEXP EQUAL NUMBER { IF_DNS_CACHE(default_core_cfg.dns_cache_del_nonexp=$3); }
| DNS_CACHE_DEL_NONEXP error { yyerror("boolean value expected"); }
| DNS_CACHE_REC_PREF EQUAL NUMBER { IF_DNS_CACHE(default_core_cfg.dns_cache_rec_pref=$3); }
| DNS_CACHE_REC_PREF error { yyerror("boolean value expected"); }
| AUTO_BIND_IPV6 EQUAL NUMBER {IF_AUTO_BIND_IPV6(auto_bind_ipv6 = $3);}
| AUTO_BIND_IPV6 error { yyerror("boolean value expected"); }
| DST_BLST_INIT EQUAL NUMBER { IF_DST_BLACKLIST(dst_blacklist_init=$3); }
Expand Down

0 comments on commit 0d4d530

Please sign in to comment.