mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Patch for view functionality for local-data-ptr from Björn Ketelaars.
git-svn-id: file:///svn/unbound/trunk@4063 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
984c6c33bc
commit
52dd15dd87
5 changed files with 621 additions and 578 deletions
|
|
@ -1,3 +1,6 @@
|
|||
17 March 2017: Wouter
|
||||
- Patch for view functionality for local-data-ptr from Björn Ketelaars.
|
||||
|
||||
16 March 2017: Wouter
|
||||
- Fix that SHM is not inited if not enabled.
|
||||
- Add trustanchor.unbound CH TXT that gets a response with a number
|
||||
|
|
|
|||
|
|
@ -782,6 +782,7 @@ remote-control:
|
|||
# name: "viewname"
|
||||
# local-zone: "example.com" redirect
|
||||
# local-data: "example.com A 192.0.2.3"
|
||||
# local-data-ptr: "192.0.2.3 www.example.com"
|
||||
# view-first: no
|
||||
# view:
|
||||
# name: "anotherview"
|
||||
|
|
|
|||
|
|
@ -1406,6 +1406,10 @@ global local\-zone elements.
|
|||
View specific local\-data elements. Has the same behaviour as the global
|
||||
local\-data elements.
|
||||
.TP
|
||||
.B local\-data\-ptr: \fI"IPaddr name"
|
||||
View specific local\-data\-ptr elements. Has the same behaviour as the global
|
||||
local\-data\-ptr elements.
|
||||
.TP
|
||||
.B view\-first: \fI<yes or no>
|
||||
If enabled, it attempts to use the global local\-zone and local\-data if there
|
||||
is no match in the view specific options.
|
||||
|
|
|
|||
1174
util/configparser.c
1174
util/configparser.c
File diff suppressed because it is too large
Load diff
|
|
@ -272,7 +272,7 @@ viewstart: VAR_VIEW
|
|||
contents_view: contents_view content_view
|
||||
| ;
|
||||
content_view: view_name | view_local_zone | view_local_data | view_first |
|
||||
view_response_ip | view_response_ip_data
|
||||
view_response_ip | view_response_ip_data | view_local_data_ptr
|
||||
;
|
||||
server_num_threads: VAR_NUM_THREADS STRING_ARG
|
||||
{
|
||||
|
|
@ -1864,6 +1864,21 @@ view_local_data: VAR_LOCAL_DATA STRING_ARG
|
|||
}
|
||||
}
|
||||
;
|
||||
view_local_data_ptr: VAR_LOCAL_DATA_PTR STRING_ARG
|
||||
{
|
||||
char* ptr;
|
||||
OUTYY(("P(view_local_data_ptr:%s)\n", $2));
|
||||
ptr = cfg_ptr_reverse($2);
|
||||
free($2);
|
||||
if(ptr) {
|
||||
if(!cfg_strlist_insert(&cfg_parser->cfg->views->
|
||||
local_data, ptr))
|
||||
fatal_exit("out of memory adding local-data");
|
||||
} else {
|
||||
yyerror("local-data-ptr could not be reversed");
|
||||
}
|
||||
}
|
||||
;
|
||||
view_first: VAR_VIEW_FIRST STRING_ARG
|
||||
{
|
||||
OUTYY(("P(view-first:%s)\n", $2));
|
||||
|
|
|
|||
Loading…
Reference in a new issue