Browse code

core: added core parameter dns_cache_rec_pref

Stefan Mititelu authored on 21/04/2015 19:07:15 • Daniel-Constantin Mierla committed on 21/04/2015 19:08:24
Showing 2 changed files
... ...
@@ -378,6 +378,7 @@ DNS_CACHE_MAX_TTL	dns_cache_max_ttl
378 378
 DNS_CACHE_MEM		dns_cache_mem
379 379
 DNS_CACHE_GC_INT	dns_cache_gc_interval
380 380
 DNS_CACHE_DEL_NONEXP	dns_cache_del_nonexp|dns_cache_delete_nonexpired
381
+DNS_CACHE_REC_PREF	dns_cache_rec_pref
381 382
 /* ipv6 auto bind */
382 383
 AUTO_BIND_IPV6		auto_bind_ipv6
383 384
 /* blacklist */
... ...
@@ -778,6 +779,8 @@ IMPORTFILE      "import_file"
778 779
 								return DNS_CACHE_GC_INT; }
779 780
 <INITIAL>{DNS_CACHE_DEL_NONEXP}	{ count(); yylval.strval=yytext;
780 781
 								return DNS_CACHE_DEL_NONEXP; }
782
+<INITIAL>{DNS_CACHE_REC_PREF}	{ count(); yylval.strval=yytext;
783
+								return DNS_CACHE_REC_PREF; }
781 784
 <INITIAL>{AUTO_BIND_IPV6}	{ count(); yylval.strval=yytext;
782 785
 								return AUTO_BIND_IPV6; }
783 786
 <INITIAL>{DST_BLST_INIT}	{ count(); yylval.strval=yytext;
... ...
@@ -425,6 +425,7 @@ extern char *default_routename;
425 425
 %token DNS_CACHE_MEM
426 426
 %token DNS_CACHE_GC_INT
427 427
 %token DNS_CACHE_DEL_NONEXP
428
+%token DNS_CACHE_REC_PREF
428 429
 
429 430
 /* ipv6 auto bind */
430 431
 %token AUTO_BIND_IPV6
... ...
@@ -899,6 +900,8 @@ assign_stm:
899 900
 	| DNS_CACHE_GC_INT error { yyerror("boolean value expected"); }
900 901
 	| DNS_CACHE_DEL_NONEXP EQUAL NUMBER   { IF_DNS_CACHE(default_core_cfg.dns_cache_del_nonexp=$3); }
901 902
 	| DNS_CACHE_DEL_NONEXP error { yyerror("boolean value expected"); }
903
+	| DNS_CACHE_REC_PREF EQUAL NUMBER   { IF_DNS_CACHE(default_core_cfg.dns_cache_rec_pref=$3); }
904
+	| DNS_CACHE_REC_PREF error { yyerror("boolean value expected"); }
902 905
 	| AUTO_BIND_IPV6 EQUAL NUMBER {IF_AUTO_BIND_IPV6(auto_bind_ipv6 = $3);}
903 906
 	| AUTO_BIND_IPV6 error { yyerror("boolean value expected"); }
904 907
 	| DST_BLST_INIT EQUAL NUMBER   { IF_DST_BLACKLIST(dst_blacklist_init=$3); }