- Fix #474: always_null and others inside view.

This commit is contained in:
W.C.A. Wijngaards 2021-04-28 14:05:23 +02:00
parent 77451862f0
commit 4604f30d70
4 changed files with 1686 additions and 1000 deletions

View file

@ -1,3 +1,6 @@
28 April 2021: Wouter
- Fix #474: always_null and others inside view.
26 April 2021: Wouter 26 April 2021: Wouter
- Merge #470 from edevil: Allow configuration of persistent TCP - Merge #470 from edevil: Allow configuration of persistent TCP
connections. connections.

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 3.7.6. */ /* A Bison parser, made by GNU Bison 3.6.4. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
Inc. Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
@ -16,7 +16,7 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
@ -368,7 +368,6 @@ extern int yydebug;
typedef enum yytokentype yytoken_kind_t; typedef enum yytokentype yytoken_kind_t;
#endif #endif
/* Token kinds. */ /* Token kinds. */
#define YYEMPTY -2
#define YYEOF 0 #define YYEOF 0
#define YYerror 256 #define YYerror 256
#define YYUNDEF 257 #define YYUNDEF 257
@ -687,11 +686,11 @@ extern int yydebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE union YYSTYPE
{ {
#line 66 "util/configparser.y" #line 66 "./util/configparser.y"
char* str; char* str;
#line 695 "util/configparser.h" #line 694 "util/configparser.h"
}; };
typedef union YYSTYPE YYSTYPE; typedef union YYSTYPE YYSTYPE;

View file

@ -2837,13 +2837,20 @@ view_local_zone: VAR_LOCAL_ZONE STRING_ARG STRING_ARG
&& strcmp($3, "always_transparent")!=0 && strcmp($3, "always_transparent")!=0
&& strcmp($3, "always_refuse")!=0 && strcmp($3, "always_refuse")!=0
&& strcmp($3, "always_nxdomain")!=0 && strcmp($3, "always_nxdomain")!=0
&& strcmp($3, "always_nodata")!=0
&& strcmp($3, "always_deny")!=0
&& strcmp($3, "always_null")!=0
&& strcmp($3, "noview")!=0 && strcmp($3, "noview")!=0
&& strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0) { && strcmp($3, "inform")!=0 && strcmp($3, "inform_deny")!=0
&& strcmp($3, "inform_redirect") != 0
&& strcmp($3, "ipset") != 0) {
yyerror("local-zone type: expected static, deny, " yyerror("local-zone type: expected static, deny, "
"refuse, redirect, transparent, " "refuse, redirect, transparent, "
"typetransparent, inform, inform_deny, " "typetransparent, inform, inform_deny, "
"always_transparent, always_refuse, " "inform_redirect, always_transparent, "
"always_nxdomain, noview or nodefault"); "always_refuse, always_nxdomain, "
"always_nodata, always_deny, always_null, "
"noview, nodefault or ipset");
free($2); free($2);
free($3); free($3);
} else if(strcmp($3, "nodefault")==0) { } else if(strcmp($3, "nodefault")==0) {