Module: kamailio
Branch: master
Commit: 0d4d530ef0140eac7c85d404257171ae868b30bc
URL:
https://github.com/kamailio/kamailio/commit/0d4d530ef0140eac7c85d404257171a…
Author: Stefan Mititelu <stefan.mititelu(a)1and1.ro>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-04-21T21:08:24+02:00
core: added core parameter dns_cache_rec_pref
---
Modified: cfg.lex
Modified: cfg.y
---
Diff:
https://github.com/kamailio/kamailio/commit/0d4d530ef0140eac7c85d404257171a…
Patch:
https://github.com/kamailio/kamailio/commit/0d4d530ef0140eac7c85d404257171a…
---
diff --git a/cfg.lex b/cfg.lex
index 3eb79dc..de18d62 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -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 */
@@ -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;
diff --git a/cfg.y b/cfg.y
index cd3d317..c302d5e 100644
--- a/cfg.y
+++ b/cfg.y
@@ -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
@@ -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); }