21 May 2024: Wouter
- Merge #1073: fix null pointer dereference issue in function
ub_ctx_set_fwd.
+ - Fix to print a parse error when config is read with no name for
+ a forward-zone, stub-zone or view.
17 May 2024: Yorgos
- Merge #1069: Fix unbound-control stdin commands for multi-process
}
;
contents_stub: contents_stub content_stub
- | ;
+ |
+ {
+ /* stub end */
+ if(cfg_parser->cfg->stubs &&
+ !cfg_parser->cfg->stubs->name)
+ yyerror("stub-zone without name");
+ };
content_stub: stub_name | stub_host | stub_addr | stub_prime | stub_first |
stub_no_cache | stub_ssl_upstream | stub_tcp_upstream
;
}
;
contents_forward: contents_forward content_forward
- | ;
+ |
+ {
+ /* forward end */
+ if(cfg_parser->cfg->forwards &&
+ !cfg_parser->cfg->forwards->name)
+ yyerror("forward-zone without name");
+ };
content_forward: forward_name | forward_host | forward_addr | forward_first |
forward_no_cache | forward_ssl_upstream | forward_tcp_upstream
;
s = (struct config_view*)calloc(1, sizeof(struct config_view));
if(s) {
s->next = cfg_parser->cfg->views;
- if(s->next && !s->next->name)
- yyerror("view without name");
cfg_parser->cfg->views = s;
} else {
yyerror("out of memory");
}
;
contents_view: contents_view content_view
- | ;
+ |
+ {
+ /* view end */
+ if(cfg_parser->cfg->views &&
+ !cfg_parser->cfg->views->name)
+ yyerror("view without name");
+ };
content_view: view_name | view_local_zone | view_local_data | view_first |
view_response_ip | view_response_ip_data | view_local_data_ptr
;