[PATCH v3 6/6] pfctl: Undef INET6 to avoid warning.
Christian Mauderer
christian.mauderer at embedded-brains.de
Wed May 2 13:15:07 UTC 2018
---
freebsd/sbin/pfctl/parse.c | 826 ++++++++++++++++++++++-----------------------
freebsd/sbin/pfctl/parse.y | 1 +
2 files changed, 412 insertions(+), 415 deletions(-)
diff --git a/freebsd/sbin/pfctl/parse.c b/freebsd/sbin/pfctl/parse.c
index c09d4ba4..6041735a 100644
--- a/freebsd/sbin/pfctl/parse.c
+++ b/freebsd/sbin/pfctl/parse.c
@@ -5,7 +5,7 @@
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
-#define YYPATCH 20160324
+#define YYPATCH 20170201
#define YYEMPTY (-1)
#define yyclearin (yychar = YYEMPTY)
@@ -100,6 +100,7 @@
#line 30 "../../freebsd/sbin/pfctl/parse.y"
#ifdef __rtems__
#include <machine/rtems-bsd-user-space.h>
+#undef INET6
#endif /* __rtems__ */
#ifdef __rtems__
@@ -532,7 +533,7 @@ int parseport(char *, struct range *r, int);
(!((addr).iflags & PFI_AFLAG_NOALIAS) || \
!isdigit((addr).v.ifname[strlen((addr).v.ifname)-1])))
-#line 536 "pfctly.tab.c"
+#line 537 "pfctly.tab.c"
/* compatibility with bison */
#ifdef YYPARSE_PARAM
@@ -2568,7 +2569,7 @@ typedef struct {
} YYSTACKDATA;
/* variables for the parser stack */
static YYSTACKDATA yystack;
-#line 4550 "../../freebsd/sbin/pfctl/parse.y"
+#line 4551 "../../freebsd/sbin/pfctl/parse.y"
#ifdef __rtems__
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, extern YYSTYPE pfctlyval);
RTEMS_LINKER_RWSET_CONTENT(bsd_prog_pfctl, extern YYSTYPE pfctlylval);
@@ -4366,10 +4367,10 @@ rt_tableid_max(void)
return (RT_TABLEID_MAX);
#endif
}
-#line 4370 "pfctly.tab.c"
+#line 4371 "pfctly.tab.c"
#if YYDEBUG
-#include <stdio.h> /* needed for printf */
+#include <stdio.h> /* needed for printf */
#endif
#include <stdlib.h> /* needed for malloc, etc */
@@ -4441,6 +4442,8 @@ YYPARSE_DECL()
}
#endif
+ yym = 0;
+ yyn = 0;
yynerrs = 0;
yyerrflag = 0;
yychar = YYEMPTY;
@@ -4460,28 +4463,26 @@ yyloop:
if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
if (yychar < 0)
{
- if ((yychar = YYLEX) < 0) yychar = YYEOF;
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
#if YYDEBUG
if (yydebug)
{
- yys = yyname[YYTRANSLATE(yychar)];
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
#endif
}
- if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
#if YYDEBUG
if (yydebug)
printf("%sdebug: state %d, shifting to state %d\n",
YYPREFIX, yystate, yytable[yyn]);
#endif
- if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
- {
- goto yyoverflow;
- }
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
yystate = yytable[yyn];
*++yystack.s_mark = yytable[yyn];
*++yystack.l_mark = yylval;
@@ -4489,18 +4490,17 @@ yyloop:
if (yyerrflag > 0) --yyerrflag;
goto yyloop;
}
- if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
{
yyn = yytable[yyn];
goto yyreduce;
}
- if (yyerrflag) goto yyinrecovery;
+ if (yyerrflag != 0) goto yyinrecovery;
YYERROR_CALL("syntax error");
- goto yyerrlab;
-
+ goto yyerrlab; /* redundant goto avoids 'unused label' warning */
yyerrlab:
++yynerrs;
@@ -4510,18 +4510,15 @@ yyinrecovery:
yyerrflag = 3;
for (;;)
{
- if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
{
#if YYDEBUG
if (yydebug)
printf("%sdebug: state %d, error recovery shifting\
to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
#endif
- if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
- {
- goto yyoverflow;
- }
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
yystate = yytable[yyn];
*++yystack.s_mark = yytable[yyn];
*++yystack.l_mark = yylval;
@@ -4546,7 +4543,7 @@ yyinrecovery:
#if YYDEBUG
if (yydebug)
{
- yys = yyname[YYTRANSLATE(yychar)];
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
YYPREFIX, yystate, yychar, yys);
}
@@ -4562,18 +4559,19 @@ yyreduce:
YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
yym = yylen[yyn];
- if (yym)
+ if (yym > 0)
yyval = yystack.l_mark[1-yym];
else
memset(&yyval, 0, sizeof yyval);
+
switch (yyn)
{
case 17:
-#line 555 "../../freebsd/sbin/pfctl/parse.y"
+#line 556 "../../freebsd/sbin/pfctl/parse.y"
{ file->errors++; }
break;
case 18:
-#line 558 "../../freebsd/sbin/pfctl/parse.y"
+#line 559 "../../freebsd/sbin/pfctl/parse.y"
{
struct file *nfile;
@@ -4589,7 +4587,7 @@ case 18:
}
break;
case 25:
-#line 585 "../../freebsd/sbin/pfctl/parse.y"
+#line 586 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "none"))
yyval.v.i = 0;
@@ -4604,7 +4602,7 @@ case 25:
}
break;
case 26:
-#line 599 "../../freebsd/sbin/pfctl/parse.y"
+#line 600 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION)) {
free(yystack.l_mark[0].v.string);
@@ -4619,7 +4617,7 @@ case 26:
}
break;
case 27:
-#line 611 "../../freebsd/sbin/pfctl/parse.y"
+#line 612 "../../freebsd/sbin/pfctl/parse.y"
{
if (!(pf->opts & PF_OPT_OPTIMIZE)) {
pf->opts |= PF_OPT_OPTIMIZE;
@@ -4628,7 +4626,7 @@ case 27:
}
break;
case 32:
-#line 621 "../../freebsd/sbin/pfctl/parse.y"
+#line 622 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION)) {
free(yystack.l_mark[0].v.string);
@@ -4643,7 +4641,7 @@ case 32:
}
break;
case 33:
-#line 633 "../../freebsd/sbin/pfctl/parse.y"
+#line 634 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number == 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("hostid must be non-zero");
@@ -4656,7 +4654,7 @@ case 33:
}
break;
case 34:
-#line 643 "../../freebsd/sbin/pfctl/parse.y"
+#line 644 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
printf("set block-policy drop\n");
@@ -4666,7 +4664,7 @@ case 34:
}
break;
case 35:
-#line 650 "../../freebsd/sbin/pfctl/parse.y"
+#line 651 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
printf("set block-policy return\n");
@@ -4676,7 +4674,7 @@ case 35:
}
break;
case 36:
-#line 657 "../../freebsd/sbin/pfctl/parse.y"
+#line 658 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
printf("set require-order %s\n",
@@ -4685,7 +4683,7 @@ case 36:
}
break;
case 37:
-#line 663 "../../freebsd/sbin/pfctl/parse.y"
+#line 664 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
printf("set fingerprints \"%s\"\n", yystack.l_mark[0].v.string);
@@ -4706,7 +4704,7 @@ case 37:
}
break;
case 38:
-#line 681 "../../freebsd/sbin/pfctl/parse.y"
+#line 682 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
switch (yystack.l_mark[0].v.i) {
@@ -4721,7 +4719,7 @@ case 38:
}
break;
case 39:
-#line 693 "../../freebsd/sbin/pfctl/parse.y"
+#line 694 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION)) {
free(yystack.l_mark[0].v.string);
@@ -4736,7 +4734,7 @@ case 39:
}
break;
case 40:
-#line 705 "../../freebsd/sbin/pfctl/parse.y"
+#line 706 "../../freebsd/sbin/pfctl/parse.y"
{
if (expand_skip_interface(yystack.l_mark[0].v.interface) != 0) {
yyerror("error setting skip interface(s)");
@@ -4745,7 +4743,7 @@ case 40:
}
break;
case 41:
-#line 711 "../../freebsd/sbin/pfctl/parse.y"
+#line 712 "../../freebsd/sbin/pfctl/parse.y"
{
if (keep_state_defaults != NULL) {
yyerror("cannot redefine state-defaults");
@@ -4755,11 +4753,11 @@ case 41:
}
break;
case 42:
-#line 720 "../../freebsd/sbin/pfctl/parse.y"
+#line 721 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.string = yystack.l_mark[0].v.string; }
break;
case 43:
-#line 721 "../../freebsd/sbin/pfctl/parse.y"
+#line 722 "../../freebsd/sbin/pfctl/parse.y"
{
if ((yyval.v.string = strdup("all")) == NULL) {
err(1, "stringall: strdup");
@@ -4767,7 +4765,7 @@ case 43:
}
break;
case 44:
-#line 728 "../../freebsd/sbin/pfctl/parse.y"
+#line 729 "../../freebsd/sbin/pfctl/parse.y"
{
if (asprintf(&yyval.v.string, "%s %s", yystack.l_mark[-1].v.string, yystack.l_mark[0].v.string) == -1)
err(1, "string: asprintf");
@@ -4776,7 +4774,7 @@ case 44:
}
break;
case 46:
-#line 737 "../../freebsd/sbin/pfctl/parse.y"
+#line 738 "../../freebsd/sbin/pfctl/parse.y"
{
if (asprintf(&yyval.v.string, "%s %s", yystack.l_mark[-1].v.string, yystack.l_mark[0].v.string) == -1)
err(1, "string: asprintf");
@@ -4785,7 +4783,7 @@ case 46:
}
break;
case 48:
-#line 746 "../../freebsd/sbin/pfctl/parse.y"
+#line 747 "../../freebsd/sbin/pfctl/parse.y"
{
char *s;
if (asprintf(&s, "%lld", (long long)yystack.l_mark[0].v.number) == -1) {
@@ -4796,7 +4794,7 @@ case 48:
}
break;
case 50:
-#line 757 "../../freebsd/sbin/pfctl/parse.y"
+#line 758 "../../freebsd/sbin/pfctl/parse.y"
{
if (pf->opts & PF_OPT_VERBOSE)
printf("%s = \"%s\"\n", yystack.l_mark[-2].v.string, yystack.l_mark[0].v.string);
@@ -4807,15 +4805,15 @@ case 50:
}
break;
case 51:
-#line 767 "../../freebsd/sbin/pfctl/parse.y"
+#line 768 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.string = yystack.l_mark[0].v.string; }
break;
case 52:
-#line 768 "../../freebsd/sbin/pfctl/parse.y"
+#line 769 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.string = NULL; }
break;
case 57:
-#line 778 "../../freebsd/sbin/pfctl/parse.y"
+#line 779 "../../freebsd/sbin/pfctl/parse.y"
{
char ta[PF_ANCHOR_NAME_SIZE];
struct pf_ruleset *rs;
@@ -4835,7 +4833,7 @@ case 57:
}
break;
case 58:
-#line 795 "../../freebsd/sbin/pfctl/parse.y"
+#line 796 "../../freebsd/sbin/pfctl/parse.y"
{
pf->alast = pf->anchor;
pf->asd--;
@@ -4843,7 +4841,7 @@ case 58:
}
break;
case 60:
-#line 805 "../../freebsd/sbin/pfctl/parse.y"
+#line 806 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
struct node_proto *proto;
@@ -4978,7 +4976,7 @@ case 60:
}
break;
case 61:
-#line 937 "../../freebsd/sbin/pfctl/parse.y"
+#line 938 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
@@ -5002,7 +5000,7 @@ case 61:
}
break;
case 62:
-#line 958 "../../freebsd/sbin/pfctl/parse.y"
+#line 959 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
@@ -5047,7 +5045,7 @@ case 62:
}
break;
case 63:
-#line 1000 "../../freebsd/sbin/pfctl/parse.y"
+#line 1001 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
@@ -5085,7 +5083,7 @@ case 63:
}
break;
case 64:
-#line 1037 "../../freebsd/sbin/pfctl/parse.y"
+#line 1038 "../../freebsd/sbin/pfctl/parse.y"
{
struct loadanchors *loadanchor;
@@ -5118,7 +5116,7 @@ case 64:
}
break;
case 65:
-#line 1068 "../../freebsd/sbin/pfctl/parse.y"
+#line 1069 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = yyval.v.b.w = 0;
if (yystack.l_mark[-1].v.i)
@@ -5128,7 +5126,7 @@ case 65:
}
break;
case 66:
-#line 1078 "../../freebsd/sbin/pfctl/parse.y"
+#line 1079 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
@@ -5186,18 +5184,18 @@ case 66:
}
break;
case 67:
-#line 1135 "../../freebsd/sbin/pfctl/parse.y"
+#line 1136 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&scrub_opts, sizeof scrub_opts);
scrub_opts.rtableid = -1;
}
break;
case 68:
-#line 1140 "../../freebsd/sbin/pfctl/parse.y"
+#line 1141 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.scrub_opts = scrub_opts; }
break;
case 69:
-#line 1141 "../../freebsd/sbin/pfctl/parse.y"
+#line 1142 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&scrub_opts, sizeof scrub_opts);
scrub_opts.rtableid = -1;
@@ -5205,7 +5203,7 @@ case 69:
}
break;
case 72:
-#line 1152 "../../freebsd/sbin/pfctl/parse.y"
+#line 1153 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.nodf) {
yyerror("no-df cannot be respecified");
@@ -5215,7 +5213,7 @@ case 72:
}
break;
case 73:
-#line 1159 "../../freebsd/sbin/pfctl/parse.y"
+#line 1160 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.marker & SOM_MINTTL) {
yyerror("min-ttl cannot be respecified");
@@ -5230,7 +5228,7 @@ case 73:
}
break;
case 74:
-#line 1171 "../../freebsd/sbin/pfctl/parse.y"
+#line 1172 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.marker & SOM_MAXMSS) {
yyerror("max-mss cannot be respecified");
@@ -5245,7 +5243,7 @@ case 74:
}
break;
case 75:
-#line 1183 "../../freebsd/sbin/pfctl/parse.y"
+#line 1184 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.marker & SOM_SETTOS) {
yyerror("set-tos cannot be respecified");
@@ -5256,7 +5254,7 @@ case 75:
}
break;
case 76:
-#line 1191 "../../freebsd/sbin/pfctl/parse.y"
+#line 1192 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.marker & SOM_FRAGCACHE) {
yyerror("fragcache cannot be respecified");
@@ -5267,7 +5265,7 @@ case 76:
}
break;
case 77:
-#line 1199 "../../freebsd/sbin/pfctl/parse.y"
+#line 1200 "../../freebsd/sbin/pfctl/parse.y"
{
if (strcasecmp(yystack.l_mark[0].v.string, "tcp") != 0) {
yyerror("scrub reassemble supports only tcp, "
@@ -5284,7 +5282,7 @@ case 77:
}
break;
case 78:
-#line 1213 "../../freebsd/sbin/pfctl/parse.y"
+#line 1214 "../../freebsd/sbin/pfctl/parse.y"
{
if (scrub_opts.randomid) {
yyerror("random-id cannot be respecified");
@@ -5294,7 +5292,7 @@ case 78:
}
break;
case 79:
-#line 1220 "../../freebsd/sbin/pfctl/parse.y"
+#line 1221 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > rt_tableid_max()) {
yyerror("invalid rtable id");
@@ -5304,26 +5302,26 @@ case 79:
}
break;
case 80:
-#line 1227 "../../freebsd/sbin/pfctl/parse.y"
+#line 1228 "../../freebsd/sbin/pfctl/parse.y"
{
scrub_opts.match_tag = yystack.l_mark[0].v.string;
scrub_opts.match_tag_not = yystack.l_mark[-2].v.number;
}
break;
case 81:
-#line 1233 "../../freebsd/sbin/pfctl/parse.y"
+#line 1234 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; /* default */ }
break;
case 82:
-#line 1234 "../../freebsd/sbin/pfctl/parse.y"
+#line 1235 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; }
break;
case 83:
-#line 1235 "../../freebsd/sbin/pfctl/parse.y"
+#line 1236 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; }
break;
case 84:
-#line 1238 "../../freebsd/sbin/pfctl/parse.y"
+#line 1239 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
struct node_host *h = NULL, *hh;
@@ -5411,19 +5409,19 @@ case 84:
}
break;
case 85:
-#line 1325 "../../freebsd/sbin/pfctl/parse.y"
+#line 1326 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[0].v.interface; }
break;
case 86:
-#line 1326 "../../freebsd/sbin/pfctl/parse.y"
+#line 1327 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[-1].v.interface; }
break;
case 87:
-#line 1329 "../../freebsd/sbin/pfctl/parse.y"
+#line 1330 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[-1].v.interface; }
break;
case 88:
-#line 1330 "../../freebsd/sbin/pfctl/parse.y"
+#line 1331 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.interface->tail->next = yystack.l_mark[-1].v.interface;
yystack.l_mark[-3].v.interface->tail = yystack.l_mark[-1].v.interface;
@@ -5431,29 +5429,29 @@ case 88:
}
break;
case 89:
-#line 1337 "../../freebsd/sbin/pfctl/parse.y"
+#line 1338 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[0].v.interface; }
break;
case 90:
-#line 1338 "../../freebsd/sbin/pfctl/parse.y"
+#line 1339 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-1].v.interface->dynamic = 1;
yyval.v.interface = yystack.l_mark[-1].v.interface;
}
break;
case 91:
-#line 1344 "../../freebsd/sbin/pfctl/parse.y"
+#line 1345 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&antispoof_opts, sizeof antispoof_opts);
antispoof_opts.rtableid = -1;
}
break;
case 92:
-#line 1349 "../../freebsd/sbin/pfctl/parse.y"
+#line 1350 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.antispoof_opts = antispoof_opts; }
break;
case 93:
-#line 1350 "../../freebsd/sbin/pfctl/parse.y"
+#line 1351 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&antispoof_opts, sizeof antispoof_opts);
antispoof_opts.rtableid = -1;
@@ -5461,7 +5459,7 @@ case 93:
}
break;
case 96:
-#line 1361 "../../freebsd/sbin/pfctl/parse.y"
+#line 1362 "../../freebsd/sbin/pfctl/parse.y"
{
if (antispoof_opts.label) {
yyerror("label cannot be redefined");
@@ -5471,7 +5469,7 @@ case 96:
}
break;
case 97:
-#line 1368 "../../freebsd/sbin/pfctl/parse.y"
+#line 1369 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > rt_tableid_max()) {
yyerror("invalid rtable id");
@@ -5481,15 +5479,15 @@ case 97:
}
break;
case 98:
-#line 1377 "../../freebsd/sbin/pfctl/parse.y"
+#line 1378 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number = 1; }
break;
case 99:
-#line 1378 "../../freebsd/sbin/pfctl/parse.y"
+#line 1379 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number = 0; }
break;
case 100:
-#line 1381 "../../freebsd/sbin/pfctl/parse.y"
+#line 1382 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *h, *nh;
struct node_tinit *ti, *nti;
@@ -5520,18 +5518,18 @@ case 100:
}
break;
case 101:
-#line 1411 "../../freebsd/sbin/pfctl/parse.y"
+#line 1412 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&table_opts, sizeof table_opts);
SIMPLEQ_INIT(&table_opts.init_nodes);
}
break;
case 102:
-#line 1416 "../../freebsd/sbin/pfctl/parse.y"
+#line 1417 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.table_opts = table_opts; }
break;
case 103:
-#line 1418 "../../freebsd/sbin/pfctl/parse.y"
+#line 1419 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&table_opts, sizeof table_opts);
SIMPLEQ_INIT(&table_opts.init_nodes);
@@ -5539,7 +5537,7 @@ case 103:
}
break;
case 106:
-#line 1429 "../../freebsd/sbin/pfctl/parse.y"
+#line 1430 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "const"))
table_opts.flags |= PFR_TFLAG_CONST;
@@ -5556,11 +5554,11 @@ case 106:
}
break;
case 107:
-#line 1443 "../../freebsd/sbin/pfctl/parse.y"
+#line 1444 "../../freebsd/sbin/pfctl/parse.y"
{ table_opts.init_addr = 1; }
break;
case 108:
-#line 1444 "../../freebsd/sbin/pfctl/parse.y"
+#line 1445 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *n;
struct node_tinit *ti;
@@ -5603,7 +5601,7 @@ case 108:
}
break;
case 109:
-#line 1484 "../../freebsd/sbin/pfctl/parse.y"
+#line 1485 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_tinit *ti;
@@ -5616,7 +5614,7 @@ case 109:
}
break;
case 110:
-#line 1496 "../../freebsd/sbin/pfctl/parse.y"
+#line 1497 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_altq a;
@@ -5641,7 +5639,7 @@ case 110:
}
break;
case 111:
-#line 1520 "../../freebsd/sbin/pfctl/parse.y"
+#line 1521 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_altq a;
@@ -5679,7 +5677,7 @@ case 111:
}
break;
case 112:
-#line 1557 "../../freebsd/sbin/pfctl/parse.y"
+#line 1558 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&queue_opts, sizeof queue_opts);
queue_opts.priority = DEFAULT_PRIORITY;
@@ -5689,11 +5687,11 @@ case 112:
}
break;
case 113:
-#line 1565 "../../freebsd/sbin/pfctl/parse.y"
+#line 1566 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.queue_opts = queue_opts; }
break;
case 114:
-#line 1566 "../../freebsd/sbin/pfctl/parse.y"
+#line 1567 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&queue_opts, sizeof queue_opts);
queue_opts.priority = DEFAULT_PRIORITY;
@@ -5704,7 +5702,7 @@ case 114:
}
break;
case 117:
-#line 1580 "../../freebsd/sbin/pfctl/parse.y"
+#line 1581 "../../freebsd/sbin/pfctl/parse.y"
{
if (queue_opts.marker & QOM_BWSPEC) {
yyerror("bandwidth cannot be respecified");
@@ -5715,7 +5713,7 @@ case 117:
}
break;
case 118:
-#line 1588 "../../freebsd/sbin/pfctl/parse.y"
+#line 1589 "../../freebsd/sbin/pfctl/parse.y"
{
if (queue_opts.marker & QOM_PRIORITY) {
yyerror("priority cannot be respecified");
@@ -5730,7 +5728,7 @@ case 118:
}
break;
case 119:
-#line 1600 "../../freebsd/sbin/pfctl/parse.y"
+#line 1601 "../../freebsd/sbin/pfctl/parse.y"
{
if (queue_opts.marker & QOM_QLIMIT) {
yyerror("qlimit cannot be respecified");
@@ -5745,7 +5743,7 @@ case 119:
}
break;
case 120:
-#line 1612 "../../freebsd/sbin/pfctl/parse.y"
+#line 1613 "../../freebsd/sbin/pfctl/parse.y"
{
if (queue_opts.marker & QOM_SCHEDULER) {
yyerror("scheduler cannot be respecified");
@@ -5756,7 +5754,7 @@ case 120:
}
break;
case 121:
-#line 1620 "../../freebsd/sbin/pfctl/parse.y"
+#line 1621 "../../freebsd/sbin/pfctl/parse.y"
{
if (queue_opts.marker & QOM_TBRSIZE) {
yyerror("tbrsize cannot be respecified");
@@ -5771,7 +5769,7 @@ case 121:
}
break;
case 122:
-#line 1634 "../../freebsd/sbin/pfctl/parse.y"
+#line 1635 "../../freebsd/sbin/pfctl/parse.y"
{
double bps;
char *cp;
@@ -5817,7 +5815,7 @@ case 122:
}
break;
case 123:
-#line 1677 "../../freebsd/sbin/pfctl/parse.y"
+#line 1678 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("bandwidth number too big");
@@ -5828,35 +5826,35 @@ case 123:
}
break;
case 124:
-#line 1687 "../../freebsd/sbin/pfctl/parse.y"
+#line 1688 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_CBQ;
yyval.v.queue_options.data.cbq_opts.flags = 0;
}
break;
case 125:
-#line 1691 "../../freebsd/sbin/pfctl/parse.y"
+#line 1692 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_CBQ;
yyval.v.queue_options.data.cbq_opts.flags = yystack.l_mark[-1].v.number;
}
break;
case 126:
-#line 1695 "../../freebsd/sbin/pfctl/parse.y"
+#line 1696 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_PRIQ;
yyval.v.queue_options.data.priq_opts.flags = 0;
}
break;
case 127:
-#line 1699 "../../freebsd/sbin/pfctl/parse.y"
+#line 1700 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_PRIQ;
yyval.v.queue_options.data.priq_opts.flags = yystack.l_mark[-1].v.number;
}
break;
case 128:
-#line 1703 "../../freebsd/sbin/pfctl/parse.y"
+#line 1704 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_HFSC;
bzero(&yyval.v.queue_options.data.hfsc_opts,
@@ -5864,14 +5862,14 @@ case 128:
}
break;
case 129:
-#line 1708 "../../freebsd/sbin/pfctl/parse.y"
+#line 1709 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_HFSC;
yyval.v.queue_options.data.hfsc_opts = yystack.l_mark[-1].v.hfsc_opts;
}
break;
case 130:
-#line 1712 "../../freebsd/sbin/pfctl/parse.y"
+#line 1713 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_FAIRQ;
bzero(&yyval.v.queue_options.data.fairq_opts,
@@ -5879,14 +5877,14 @@ case 130:
}
break;
case 131:
-#line 1717 "../../freebsd/sbin/pfctl/parse.y"
+#line 1718 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_FAIRQ;
yyval.v.queue_options.data.fairq_opts = yystack.l_mark[-1].v.fairq_opts;
}
break;
case 132:
-#line 1721 "../../freebsd/sbin/pfctl/parse.y"
+#line 1722 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_CODEL;
bzero(&yyval.v.queue_options.data.codel_opts,
@@ -5894,22 +5892,22 @@ case 132:
}
break;
case 133:
-#line 1726 "../../freebsd/sbin/pfctl/parse.y"
+#line 1727 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue_options.qtype = ALTQT_CODEL;
yyval.v.queue_options.data.codel_opts = yystack.l_mark[-1].v.codel_opts;
}
break;
case 134:
-#line 1732 "../../freebsd/sbin/pfctl/parse.y"
+#line 1733 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number |= yystack.l_mark[0].v.number; }
break;
case 135:
-#line 1733 "../../freebsd/sbin/pfctl/parse.y"
+#line 1734 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number |= yystack.l_mark[0].v.number; }
break;
case 136:
-#line 1736 "../../freebsd/sbin/pfctl/parse.y"
+#line 1737 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "default"))
yyval.v.number = CBQCLF_DEFCLASS;
@@ -5932,15 +5930,15 @@ case 136:
}
break;
case 137:
-#line 1758 "../../freebsd/sbin/pfctl/parse.y"
+#line 1759 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number |= yystack.l_mark[0].v.number; }
break;
case 138:
-#line 1759 "../../freebsd/sbin/pfctl/parse.y"
+#line 1760 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number |= yystack.l_mark[0].v.number; }
break;
case 139:
-#line 1762 "../../freebsd/sbin/pfctl/parse.y"
+#line 1763 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "default"))
yyval.v.number = PRCF_DEFAULTCLASS;
@@ -5961,20 +5959,20 @@ case 139:
}
break;
case 140:
-#line 1782 "../../freebsd/sbin/pfctl/parse.y"
+#line 1783 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&hfsc_opts,
sizeof(struct node_hfsc_opts));
}
break;
case 141:
-#line 1786 "../../freebsd/sbin/pfctl/parse.y"
+#line 1787 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.hfsc_opts = hfsc_opts;
}
break;
case 144:
-#line 1795 "../../freebsd/sbin/pfctl/parse.y"
+#line 1796 "../../freebsd/sbin/pfctl/parse.y"
{
if (hfsc_opts.linkshare.used) {
yyerror("linkshare already specified");
@@ -5985,7 +5983,7 @@ case 144:
}
break;
case 145:
-#line 1804 "../../freebsd/sbin/pfctl/parse.y"
+#line 1805 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-3].v.number < 0 || yystack.l_mark[-3].v.number > INT_MAX) {
yyerror("timing in curve out of range");
@@ -6002,7 +6000,7 @@ case 145:
}
break;
case 146:
-#line 1818 "../../freebsd/sbin/pfctl/parse.y"
+#line 1819 "../../freebsd/sbin/pfctl/parse.y"
{
if (hfsc_opts.realtime.used) {
yyerror("realtime already specified");
@@ -6013,7 +6011,7 @@ case 146:
}
break;
case 147:
-#line 1827 "../../freebsd/sbin/pfctl/parse.y"
+#line 1828 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-3].v.number < 0 || yystack.l_mark[-3].v.number > INT_MAX) {
yyerror("timing in curve out of range");
@@ -6030,7 +6028,7 @@ case 147:
}
break;
case 148:
-#line 1841 "../../freebsd/sbin/pfctl/parse.y"
+#line 1842 "../../freebsd/sbin/pfctl/parse.y"
{
if (hfsc_opts.upperlimit.used) {
yyerror("upperlimit already specified");
@@ -6041,7 +6039,7 @@ case 148:
}
break;
case 149:
-#line 1850 "../../freebsd/sbin/pfctl/parse.y"
+#line 1851 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-3].v.number < 0 || yystack.l_mark[-3].v.number > INT_MAX) {
yyerror("timing in curve out of range");
@@ -6058,7 +6056,7 @@ case 149:
}
break;
case 150:
-#line 1864 "../../freebsd/sbin/pfctl/parse.y"
+#line 1865 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "default"))
hfsc_opts.flags |= HFCF_DEFAULTCLASS;
@@ -6079,20 +6077,20 @@ case 150:
}
break;
case 151:
-#line 1884 "../../freebsd/sbin/pfctl/parse.y"
+#line 1885 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&fairq_opts,
sizeof(struct node_fairq_opts));
}
break;
case 152:
-#line 1888 "../../freebsd/sbin/pfctl/parse.y"
+#line 1889 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.fairq_opts = fairq_opts;
}
break;
case 155:
-#line 1897 "../../freebsd/sbin/pfctl/parse.y"
+#line 1898 "../../freebsd/sbin/pfctl/parse.y"
{
if (fairq_opts.linkshare.used) {
yyerror("linkshare already specified");
@@ -6103,7 +6101,7 @@ case 155:
}
break;
case 156:
-#line 1905 "../../freebsd/sbin/pfctl/parse.y"
+#line 1906 "../../freebsd/sbin/pfctl/parse.y"
{
if (fairq_opts.linkshare.used) {
yyerror("linkshare already specified");
@@ -6116,19 +6114,19 @@ case 156:
}
break;
case 157:
-#line 1915 "../../freebsd/sbin/pfctl/parse.y"
+#line 1916 "../../freebsd/sbin/pfctl/parse.y"
{
fairq_opts.hogs_bw = yystack.l_mark[0].v.queue_bwspec;
}
break;
case 158:
-#line 1918 "../../freebsd/sbin/pfctl/parse.y"
+#line 1919 "../../freebsd/sbin/pfctl/parse.y"
{
fairq_opts.nbuckets = yystack.l_mark[0].v.number;
}
break;
case 159:
-#line 1921 "../../freebsd/sbin/pfctl/parse.y"
+#line 1922 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "default"))
fairq_opts.flags |= FARF_DEFAULTCLASS;
@@ -6149,20 +6147,20 @@ case 159:
}
break;
case 160:
-#line 1941 "../../freebsd/sbin/pfctl/parse.y"
+#line 1942 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&codel_opts,
sizeof(struct codel_opts));
}
break;
case 161:
-#line 1945 "../../freebsd/sbin/pfctl/parse.y"
+#line 1946 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.codel_opts = codel_opts;
}
break;
case 164:
-#line 1954 "../../freebsd/sbin/pfctl/parse.y"
+#line 1955 "../../freebsd/sbin/pfctl/parse.y"
{
if (codel_opts.interval) {
yyerror("interval already specified");
@@ -6172,7 +6170,7 @@ case 164:
}
break;
case 165:
-#line 1961 "../../freebsd/sbin/pfctl/parse.y"
+#line 1962 "../../freebsd/sbin/pfctl/parse.y"
{
if (codel_opts.target) {
yyerror("target already specified");
@@ -6182,7 +6180,7 @@ case 165:
}
break;
case 166:
-#line 1968 "../../freebsd/sbin/pfctl/parse.y"
+#line 1969 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "ecn"))
codel_opts.ecn = 1;
@@ -6195,23 +6193,23 @@ case 166:
}
break;
case 167:
-#line 1980 "../../freebsd/sbin/pfctl/parse.y"
+#line 1981 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.queue = NULL; }
break;
case 168:
-#line 1981 "../../freebsd/sbin/pfctl/parse.y"
+#line 1982 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.queue = yystack.l_mark[0].v.queue; }
break;
case 169:
-#line 1982 "../../freebsd/sbin/pfctl/parse.y"
+#line 1983 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.queue = yystack.l_mark[-1].v.queue; }
break;
case 170:
-#line 1985 "../../freebsd/sbin/pfctl/parse.y"
+#line 1986 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.queue = yystack.l_mark[-1].v.queue; }
break;
case 171:
-#line 1986 "../../freebsd/sbin/pfctl/parse.y"
+#line 1987 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.queue->tail->next = yystack.l_mark[-1].v.queue;
yystack.l_mark[-3].v.queue->tail = yystack.l_mark[-1].v.queue;
@@ -6219,7 +6217,7 @@ case 171:
}
break;
case 172:
-#line 1993 "../../freebsd/sbin/pfctl/parse.y"
+#line 1994 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.queue = calloc(1, sizeof(struct node_queue));
if (yyval.v.queue == NULL)
@@ -6238,7 +6236,7 @@ case 172:
}
break;
case 173:
-#line 2013 "../../freebsd/sbin/pfctl/parse.y"
+#line 2014 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
struct node_state_opt *o;
@@ -6663,18 +6661,18 @@ case 173:
}
break;
case 174:
-#line 2437 "../../freebsd/sbin/pfctl/parse.y"
+#line 2438 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&filter_opts, sizeof filter_opts);
filter_opts.rtableid = -1;
}
break;
case 175:
-#line 2442 "../../freebsd/sbin/pfctl/parse.y"
+#line 2443 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.filter_opts = filter_opts; }
break;
case 176:
-#line 2443 "../../freebsd/sbin/pfctl/parse.y"
+#line 2444 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&filter_opts, sizeof filter_opts);
filter_opts.rtableid = -1;
@@ -6682,7 +6680,7 @@ case 176:
}
break;
case 179:
-#line 2454 "../../freebsd/sbin/pfctl/parse.y"
+#line 2455 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.uid)
yystack.l_mark[0].v.uid->tail->next = filter_opts.uid;
@@ -6690,7 +6688,7 @@ case 179:
}
break;
case 180:
-#line 2459 "../../freebsd/sbin/pfctl/parse.y"
+#line 2460 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.gid)
yystack.l_mark[0].v.gid->tail->next = filter_opts.gid;
@@ -6698,7 +6696,7 @@ case 180:
}
break;
case 181:
-#line 2464 "../../freebsd/sbin/pfctl/parse.y"
+#line 2465 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_FLAGS) {
yyerror("flags cannot be redefined");
@@ -6712,7 +6710,7 @@ case 181:
}
break;
case 182:
-#line 2475 "../../freebsd/sbin/pfctl/parse.y"
+#line 2476 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_ICMP) {
yyerror("icmp-type cannot be redefined");
@@ -6723,7 +6721,7 @@ case 182:
}
break;
case 183:
-#line 2483 "../../freebsd/sbin/pfctl/parse.y"
+#line 2484 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_PRIO) {
yyerror("prio cannot be redefined");
@@ -6738,7 +6736,7 @@ case 183:
}
break;
case 184:
-#line 2495 "../../freebsd/sbin/pfctl/parse.y"
+#line 2496 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_TOS) {
yyerror("tos cannot be redefined");
@@ -6749,7 +6747,7 @@ case 184:
}
break;
case 185:
-#line 2503 "../../freebsd/sbin/pfctl/parse.y"
+#line 2504 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_KEEP) {
yyerror("modulate or keep cannot be redefined");
@@ -6761,19 +6759,19 @@ case 185:
}
break;
case 186:
-#line 2512 "../../freebsd/sbin/pfctl/parse.y"
+#line 2513 "../../freebsd/sbin/pfctl/parse.y"
{
filter_opts.fragment = 1;
}
break;
case 187:
-#line 2515 "../../freebsd/sbin/pfctl/parse.y"
+#line 2516 "../../freebsd/sbin/pfctl/parse.y"
{
filter_opts.allowopts = 1;
}
break;
case 188:
-#line 2518 "../../freebsd/sbin/pfctl/parse.y"
+#line 2519 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.label) {
yyerror("label cannot be redefined");
@@ -6783,7 +6781,7 @@ case 188:
}
break;
case 189:
-#line 2525 "../../freebsd/sbin/pfctl/parse.y"
+#line 2526 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.queues.qname) {
yyerror("queue cannot be redefined");
@@ -6793,20 +6791,20 @@ case 189:
}
break;
case 190:
-#line 2532 "../../freebsd/sbin/pfctl/parse.y"
+#line 2533 "../../freebsd/sbin/pfctl/parse.y"
{
filter_opts.tag = yystack.l_mark[0].v.string;
}
break;
case 191:
-#line 2535 "../../freebsd/sbin/pfctl/parse.y"
+#line 2536 "../../freebsd/sbin/pfctl/parse.y"
{
filter_opts.match_tag = yystack.l_mark[0].v.string;
filter_opts.match_tag_not = yystack.l_mark[-2].v.number;
}
break;
case 192:
-#line 2539 "../../freebsd/sbin/pfctl/parse.y"
+#line 2540 "../../freebsd/sbin/pfctl/parse.y"
{
double p;
@@ -6821,7 +6819,7 @@ case 192:
}
break;
case 193:
-#line 2551 "../../freebsd/sbin/pfctl/parse.y"
+#line 2552 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > rt_tableid_max()) {
yyerror("invalid rtable id");
@@ -6831,7 +6829,7 @@ case 193:
}
break;
case 194:
-#line 2558 "../../freebsd/sbin/pfctl/parse.y"
+#line 2559 "../../freebsd/sbin/pfctl/parse.y"
{
#ifdef __FreeBSD__
filter_opts.divert.port = yystack.l_mark[0].v.range.a;
@@ -6843,7 +6841,7 @@ case 194:
}
break;
case 195:
-#line 2567 "../../freebsd/sbin/pfctl/parse.y"
+#line 2568 "../../freebsd/sbin/pfctl/parse.y"
{
#ifndef __FreeBSD__
if ((filter_opts.divert.addr = host(yystack.l_mark[-2].v.string)) == NULL) {
@@ -6864,7 +6862,7 @@ case 195:
}
break;
case 196:
-#line 2585 "../../freebsd/sbin/pfctl/parse.y"
+#line 2586 "../../freebsd/sbin/pfctl/parse.y"
{
#ifdef __FreeBSD__
yyerror("divert-reply has no meaning in FreeBSD pf(4)");
@@ -6875,15 +6873,15 @@ case 196:
}
break;
case 198:
-#line 2596 "../../freebsd/sbin/pfctl/parse.y"
+#line 2597 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.filter_opts = filter_opts; }
break;
case 199:
-#line 2597 "../../freebsd/sbin/pfctl/parse.y"
+#line 2598 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.filter_opts = filter_opts; }
break;
case 202:
-#line 2604 "../../freebsd/sbin/pfctl/parse.y"
+#line 2605 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & FOM_SETPRIO) {
yyerror("prio cannot be redefined");
@@ -6895,7 +6893,7 @@ case 202:
}
break;
case 203:
-#line 2613 "../../freebsd/sbin/pfctl/parse.y"
+#line 2614 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > PF_PRIO_MAX) {
yyerror("prio must be 0 - %u", PF_PRIO_MAX);
@@ -6905,7 +6903,7 @@ case 203:
}
break;
case 204:
-#line 2620 "../../freebsd/sbin/pfctl/parse.y"
+#line 2621 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-3].v.number < 0 || yystack.l_mark[-3].v.number > PF_PRIO_MAX ||
yystack.l_mark[-1].v.number < 0 || yystack.l_mark[-1].v.number > PF_PRIO_MAX) {
@@ -6917,7 +6915,7 @@ case 204:
}
break;
case 205:
-#line 2631 "../../freebsd/sbin/pfctl/parse.y"
+#line 2632 "../../freebsd/sbin/pfctl/parse.y"
{
char *e;
double p = strtod(yystack.l_mark[0].v.string, &e);
@@ -6936,21 +6934,21 @@ case 205:
}
break;
case 206:
-#line 2647 "../../freebsd/sbin/pfctl/parse.y"
+#line 2648 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.probability = (double)yystack.l_mark[0].v.number;
}
break;
case 207:
-#line 2653 "../../freebsd/sbin/pfctl/parse.y"
+#line 2654 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = PF_PASS; yyval.v.b.b2 = yyval.v.b.w = 0; }
break;
case 208:
-#line 2654 "../../freebsd/sbin/pfctl/parse.y"
+#line 2655 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b = yystack.l_mark[0].v.b; yyval.v.b.b1 = PF_DROP; }
break;
case 209:
-#line 2657 "../../freebsd/sbin/pfctl/parse.y"
+#line 2658 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = blockpolicy;
yyval.v.b.w = returnicmpdefault;
@@ -6958,7 +6956,7 @@ case 209:
}
break;
case 210:
-#line 2662 "../../freebsd/sbin/pfctl/parse.y"
+#line 2663 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_DROP;
yyval.v.b.w = 0;
@@ -6966,7 +6964,7 @@ case 210:
}
break;
case 211:
-#line 2667 "../../freebsd/sbin/pfctl/parse.y"
+#line 2668 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNRST;
yyval.v.b.w = 0;
@@ -6974,7 +6972,7 @@ case 211:
}
break;
case 212:
-#line 2672 "../../freebsd/sbin/pfctl/parse.y"
+#line 2673 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-1].v.number < 0 || yystack.l_mark[-1].v.number > 255) {
yyerror("illegal ttl value %d", yystack.l_mark[-1].v.number);
@@ -6986,7 +6984,7 @@ case 212:
}
break;
case 213:
-#line 2681 "../../freebsd/sbin/pfctl/parse.y"
+#line 2682 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNICMP;
yyval.v.b.w = returnicmpdefault;
@@ -6994,7 +6992,7 @@ case 213:
}
break;
case 214:
-#line 2686 "../../freebsd/sbin/pfctl/parse.y"
+#line 2687 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNICMP;
yyval.v.b.w = returnicmpdefault;
@@ -7002,7 +7000,7 @@ case 214:
}
break;
case 215:
-#line 2691 "../../freebsd/sbin/pfctl/parse.y"
+#line 2692 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNICMP;
yyval.v.b.w = yystack.l_mark[-1].v.number;
@@ -7010,7 +7008,7 @@ case 215:
}
break;
case 216:
-#line 2696 "../../freebsd/sbin/pfctl/parse.y"
+#line 2697 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNICMP;
yyval.v.b.w = returnicmpdefault;
@@ -7018,7 +7016,7 @@ case 216:
}
break;
case 217:
-#line 2701 "../../freebsd/sbin/pfctl/parse.y"
+#line 2702 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURNICMP;
yyval.v.b.w = yystack.l_mark[-3].v.number;
@@ -7026,7 +7024,7 @@ case 217:
}
break;
case 218:
-#line 2706 "../../freebsd/sbin/pfctl/parse.y"
+#line 2707 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.b.b2 = PFRULE_RETURN;
yyval.v.b.w = returnicmpdefault;
@@ -7034,7 +7032,7 @@ case 218:
}
break;
case 219:
-#line 2713 "../../freebsd/sbin/pfctl/parse.y"
+#line 2714 "../../freebsd/sbin/pfctl/parse.y"
{
if (!(yyval.v.number = parseicmpspec(yystack.l_mark[0].v.string, AF_INET))) {
free(yystack.l_mark[0].v.string);
@@ -7044,7 +7042,7 @@ case 219:
}
break;
case 220:
-#line 2720 "../../freebsd/sbin/pfctl/parse.y"
+#line 2721 "../../freebsd/sbin/pfctl/parse.y"
{
u_int8_t icmptype;
@@ -7057,7 +7055,7 @@ case 220:
}
break;
case 221:
-#line 2732 "../../freebsd/sbin/pfctl/parse.y"
+#line 2733 "../../freebsd/sbin/pfctl/parse.y"
{
if (!(yyval.v.number = parseicmpspec(yystack.l_mark[0].v.string, AF_INET6))) {
free(yystack.l_mark[0].v.string);
@@ -7067,7 +7065,7 @@ case 221:
}
break;
case 222:
-#line 2739 "../../freebsd/sbin/pfctl/parse.y"
+#line 2740 "../../freebsd/sbin/pfctl/parse.y"
{
u_int8_t icmptype;
@@ -7080,62 +7078,62 @@ case 222:
}
break;
case 223:
-#line 2751 "../../freebsd/sbin/pfctl/parse.y"
+#line 2752 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_INOUT; }
break;
case 224:
-#line 2752 "../../freebsd/sbin/pfctl/parse.y"
+#line 2753 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_IN; }
break;
case 225:
-#line 2753 "../../freebsd/sbin/pfctl/parse.y"
+#line 2754 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OUT; }
break;
case 226:
-#line 2756 "../../freebsd/sbin/pfctl/parse.y"
+#line 2757 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.quick = 0; }
break;
case 227:
-#line 2757 "../../freebsd/sbin/pfctl/parse.y"
+#line 2758 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.quick = 1; }
break;
case 228:
-#line 2760 "../../freebsd/sbin/pfctl/parse.y"
+#line 2761 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.log = 0; yyval.v.logquick.quick = 0; yyval.v.logquick.logif = 0; }
break;
case 229:
-#line 2761 "../../freebsd/sbin/pfctl/parse.y"
+#line 2762 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick = yystack.l_mark[0].v.logquick; yyval.v.logquick.quick = 0; }
break;
case 230:
-#line 2762 "../../freebsd/sbin/pfctl/parse.y"
+#line 2763 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.quick = 1; yyval.v.logquick.log = 0; yyval.v.logquick.logif = 0; }
break;
case 231:
-#line 2763 "../../freebsd/sbin/pfctl/parse.y"
+#line 2764 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick = yystack.l_mark[-1].v.logquick; yyval.v.logquick.quick = 1; }
break;
case 232:
-#line 2764 "../../freebsd/sbin/pfctl/parse.y"
+#line 2765 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick = yystack.l_mark[0].v.logquick; yyval.v.logquick.quick = 1; }
break;
case 233:
-#line 2767 "../../freebsd/sbin/pfctl/parse.y"
+#line 2768 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.log = PF_LOG; yyval.v.logquick.logif = 0; }
break;
case 234:
-#line 2768 "../../freebsd/sbin/pfctl/parse.y"
+#line 2769 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.logquick.log = PF_LOG | yystack.l_mark[-1].v.logquick.log;
yyval.v.logquick.logif = yystack.l_mark[-1].v.logquick.logif;
}
break;
case 235:
-#line 2774 "../../freebsd/sbin/pfctl/parse.y"
+#line 2775 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick = yystack.l_mark[0].v.logquick; }
break;
case 236:
-#line 2775 "../../freebsd/sbin/pfctl/parse.y"
+#line 2776 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.logquick.log = yystack.l_mark[-2].v.logquick.log | yystack.l_mark[0].v.logquick.log;
yyval.v.logquick.logif = yystack.l_mark[0].v.logquick.logif;
@@ -7144,19 +7142,19 @@ case 236:
}
break;
case 237:
-#line 2783 "../../freebsd/sbin/pfctl/parse.y"
+#line 2784 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.log = PF_LOG_ALL; yyval.v.logquick.logif = 0; }
break;
case 238:
-#line 2784 "../../freebsd/sbin/pfctl/parse.y"
+#line 2785 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.log = PF_LOG_SOCKET_LOOKUP; yyval.v.logquick.logif = 0; }
break;
case 239:
-#line 2785 "../../freebsd/sbin/pfctl/parse.y"
+#line 2786 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.logquick.log = PF_LOG_SOCKET_LOOKUP; yyval.v.logquick.logif = 0; }
break;
case 240:
-#line 2786 "../../freebsd/sbin/pfctl/parse.y"
+#line 2787 "../../freebsd/sbin/pfctl/parse.y"
{
const char *errstr;
u_int i;
@@ -7178,23 +7176,23 @@ case 240:
}
break;
case 241:
-#line 2807 "../../freebsd/sbin/pfctl/parse.y"
+#line 2808 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = NULL; }
break;
case 242:
-#line 2808 "../../freebsd/sbin/pfctl/parse.y"
+#line 2809 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[0].v.interface; }
break;
case 243:
-#line 2809 "../../freebsd/sbin/pfctl/parse.y"
+#line 2810 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[-1].v.interface; }
break;
case 244:
-#line 2812 "../../freebsd/sbin/pfctl/parse.y"
+#line 2813 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[-1].v.interface; }
break;
case 245:
-#line 2813 "../../freebsd/sbin/pfctl/parse.y"
+#line 2814 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.interface->tail->next = yystack.l_mark[-1].v.interface;
yystack.l_mark[-3].v.interface->tail = yystack.l_mark[-1].v.interface;
@@ -7202,11 +7200,11 @@ case 245:
}
break;
case 246:
-#line 2820 "../../freebsd/sbin/pfctl/parse.y"
+#line 2821 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.interface = yystack.l_mark[0].v.interface; yyval.v.interface->not = yystack.l_mark[-1].v.number; }
break;
case 247:
-#line 2823 "../../freebsd/sbin/pfctl/parse.y"
+#line 2824 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *n;
@@ -7231,35 +7229,35 @@ case 247:
}
break;
case 248:
-#line 2847 "../../freebsd/sbin/pfctl/parse.y"
+#line 2848 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; }
break;
case 249:
-#line 2848 "../../freebsd/sbin/pfctl/parse.y"
+#line 2849 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = AF_INET; }
break;
case 250:
-#line 2849 "../../freebsd/sbin/pfctl/parse.y"
+#line 2850 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = AF_INET6; }
break;
case 251:
-#line 2852 "../../freebsd/sbin/pfctl/parse.y"
+#line 2853 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.proto = NULL; }
break;
case 252:
-#line 2853 "../../freebsd/sbin/pfctl/parse.y"
+#line 2854 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.proto = yystack.l_mark[0].v.proto; }
break;
case 253:
-#line 2854 "../../freebsd/sbin/pfctl/parse.y"
+#line 2855 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.proto = yystack.l_mark[-1].v.proto; }
break;
case 254:
-#line 2857 "../../freebsd/sbin/pfctl/parse.y"
+#line 2858 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.proto = yystack.l_mark[-1].v.proto; }
break;
case 255:
-#line 2858 "../../freebsd/sbin/pfctl/parse.y"
+#line 2859 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.proto->tail->next = yystack.l_mark[-1].v.proto;
yystack.l_mark[-3].v.proto->tail = yystack.l_mark[-1].v.proto;
@@ -7267,7 +7265,7 @@ case 255:
}
break;
case 256:
-#line 2865 "../../freebsd/sbin/pfctl/parse.y"
+#line 2866 "../../freebsd/sbin/pfctl/parse.y"
{
u_int8_t pr;
@@ -7285,7 +7283,7 @@ case 256:
}
break;
case 257:
-#line 2882 "../../freebsd/sbin/pfctl/parse.y"
+#line 2883 "../../freebsd/sbin/pfctl/parse.y"
{
struct protoent *p;
@@ -7300,7 +7298,7 @@ case 257:
}
break;
case 258:
-#line 2894 "../../freebsd/sbin/pfctl/parse.y"
+#line 2895 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > 255) {
yyerror("protocol outside range");
@@ -7309,7 +7307,7 @@ case 258:
}
break;
case 259:
-#line 2902 "../../freebsd/sbin/pfctl/parse.y"
+#line 2903 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.fromto.src.host = NULL;
yyval.v.fromto.src.port = NULL;
@@ -7319,7 +7317,7 @@ case 259:
}
break;
case 260:
-#line 2909 "../../freebsd/sbin/pfctl/parse.y"
+#line 2910 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.fromto.src = yystack.l_mark[-2].v.peer;
yyval.v.fromto.src_os = yystack.l_mark[-1].v.os;
@@ -7327,19 +7325,19 @@ case 260:
}
break;
case 261:
-#line 2916 "../../freebsd/sbin/pfctl/parse.y"
+#line 2917 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.os = NULL; }
break;
case 262:
-#line 2917 "../../freebsd/sbin/pfctl/parse.y"
+#line 2918 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.os = yystack.l_mark[0].v.os; }
break;
case 263:
-#line 2918 "../../freebsd/sbin/pfctl/parse.y"
+#line 2919 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.os = yystack.l_mark[-1].v.os; }
break;
case 264:
-#line 2921 "../../freebsd/sbin/pfctl/parse.y"
+#line 2922 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.os = calloc(1, sizeof(struct node_os));
if (yyval.v.os == NULL)
@@ -7349,11 +7347,11 @@ case 264:
}
break;
case 265:
-#line 2930 "../../freebsd/sbin/pfctl/parse.y"
+#line 2931 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.os = yystack.l_mark[-1].v.os; }
break;
case 266:
-#line 2931 "../../freebsd/sbin/pfctl/parse.y"
+#line 2932 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.os->tail->next = yystack.l_mark[-1].v.os;
yystack.l_mark[-3].v.os->tail = yystack.l_mark[-1].v.os;
@@ -7361,27 +7359,27 @@ case 266:
}
break;
case 267:
-#line 2938 "../../freebsd/sbin/pfctl/parse.y"
+#line 2939 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer.host = NULL;
yyval.v.peer.port = NULL;
}
break;
case 268:
-#line 2942 "../../freebsd/sbin/pfctl/parse.y"
+#line 2943 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer = yystack.l_mark[0].v.peer;
}
break;
case 269:
-#line 2947 "../../freebsd/sbin/pfctl/parse.y"
+#line 2948 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer.host = NULL;
yyval.v.peer.port = NULL;
}
break;
case 270:
-#line 2951 "../../freebsd/sbin/pfctl/parse.y"
+#line 2952 "../../freebsd/sbin/pfctl/parse.y"
{
if (disallow_urpf_failed(yystack.l_mark[0].v.peer.host, "\"urpf-failed\" is "
"not permitted in a destination address"))
@@ -7390,52 +7388,52 @@ case 270:
}
break;
case 271:
-#line 2959 "../../freebsd/sbin/pfctl/parse.y"
+#line 2960 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer.host = yystack.l_mark[0].v.host;
yyval.v.peer.port = NULL;
}
break;
case 272:
-#line 2963 "../../freebsd/sbin/pfctl/parse.y"
+#line 2964 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer.host = yystack.l_mark[-2].v.host;
yyval.v.peer.port = yystack.l_mark[0].v.port;
}
break;
case 273:
-#line 2967 "../../freebsd/sbin/pfctl/parse.y"
+#line 2968 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.peer.host = NULL;
yyval.v.peer.port = yystack.l_mark[0].v.port;
}
break;
case 276:
-#line 2977 "../../freebsd/sbin/pfctl/parse.y"
+#line 2978 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = NULL; }
break;
case 277:
-#line 2978 "../../freebsd/sbin/pfctl/parse.y"
+#line 2979 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[0].v.host; }
break;
case 278:
-#line 2979 "../../freebsd/sbin/pfctl/parse.y"
+#line 2980 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 279:
-#line 2982 "../../freebsd/sbin/pfctl/parse.y"
+#line 2983 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[0].v.host; }
break;
case 280:
-#line 2983 "../../freebsd/sbin/pfctl/parse.y"
+#line 2984 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = NULL; }
break;
case 281:
-#line 2986 "../../freebsd/sbin/pfctl/parse.y"
+#line 2987 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 282:
-#line 2987 "../../freebsd/sbin/pfctl/parse.y"
+#line 2988 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-1].v.host == NULL)
yyval.v.host = yystack.l_mark[-3].v.host;
@@ -7449,7 +7447,7 @@ case 282:
}
break;
case 283:
-#line 3000 "../../freebsd/sbin/pfctl/parse.y"
+#line 3001 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *n;
@@ -7459,7 +7457,7 @@ case 283:
}
break;
case 284:
-#line 3007 "../../freebsd/sbin/pfctl/parse.y"
+#line 3008 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.host = calloc(1, sizeof(struct node_host));
if (yyval.v.host == NULL)
@@ -7471,7 +7469,7 @@ case 284:
}
break;
case 285:
-#line 3016 "../../freebsd/sbin/pfctl/parse.y"
+#line 3017 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.host = calloc(1, sizeof(struct node_host));
if (yyval.v.host == NULL)
@@ -7483,7 +7481,7 @@ case 285:
}
break;
case 286:
-#line 3027 "../../freebsd/sbin/pfctl/parse.y"
+#line 3028 "../../freebsd/sbin/pfctl/parse.y"
{
if ((yyval.v.host = host(yystack.l_mark[0].v.string)) == NULL) {
/* error. "any" is handled elsewhere */
@@ -7496,7 +7494,7 @@ case 286:
}
break;
case 287:
-#line 3037 "../../freebsd/sbin/pfctl/parse.y"
+#line 3038 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *b, *e;
@@ -7532,7 +7530,7 @@ case 287:
}
break;
case 288:
-#line 3070 "../../freebsd/sbin/pfctl/parse.y"
+#line 3071 "../../freebsd/sbin/pfctl/parse.y"
{
char *buf;
@@ -7549,7 +7547,7 @@ case 288:
}
break;
case 289:
-#line 3084 "../../freebsd/sbin/pfctl/parse.y"
+#line 3085 "../../freebsd/sbin/pfctl/parse.y"
{
char *buf;
@@ -7570,7 +7568,7 @@ case 289:
}
break;
case 291:
-#line 3103 "../../freebsd/sbin/pfctl/parse.y"
+#line 3104 "../../freebsd/sbin/pfctl/parse.y"
{
struct node_host *n;
@@ -7584,7 +7582,7 @@ case 291:
}
break;
case 292:
-#line 3114 "../../freebsd/sbin/pfctl/parse.y"
+#line 3115 "../../freebsd/sbin/pfctl/parse.y"
{
if (strlen(yystack.l_mark[-1].v.string) >= PF_TABLE_NAME_SIZE) {
yyerror("table name '%s' too long", yystack.l_mark[-1].v.string);
@@ -7605,7 +7603,7 @@ case 292:
}
break;
case 294:
-#line 3135 "../../freebsd/sbin/pfctl/parse.y"
+#line 3136 "../../freebsd/sbin/pfctl/parse.y"
{
u_long ulval;
@@ -7619,7 +7617,7 @@ case 294:
}
break;
case 295:
-#line 3148 "../../freebsd/sbin/pfctl/parse.y"
+#line 3149 "../../freebsd/sbin/pfctl/parse.y"
{
int flags = 0;
char *p, *op;
@@ -7674,19 +7672,19 @@ case 295:
}
break;
case 296:
-#line 3202 "../../freebsd/sbin/pfctl/parse.y"
+#line 3203 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.port = yystack.l_mark[0].v.port; }
break;
case 297:
-#line 3203 "../../freebsd/sbin/pfctl/parse.y"
+#line 3204 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.port = yystack.l_mark[-1].v.port; }
break;
case 298:
-#line 3206 "../../freebsd/sbin/pfctl/parse.y"
+#line 3207 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.port = yystack.l_mark[-1].v.port; }
break;
case 299:
-#line 3207 "../../freebsd/sbin/pfctl/parse.y"
+#line 3208 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.port->tail->next = yystack.l_mark[-1].v.port;
yystack.l_mark[-3].v.port->tail = yystack.l_mark[-1].v.port;
@@ -7694,7 +7692,7 @@ case 299:
}
break;
case 300:
-#line 3214 "../../freebsd/sbin/pfctl/parse.y"
+#line 3215 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.port = calloc(1, sizeof(struct node_port));
if (yyval.v.port == NULL)
@@ -7710,7 +7708,7 @@ case 300:
}
break;
case 301:
-#line 3227 "../../freebsd/sbin/pfctl/parse.y"
+#line 3228 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.range.t) {
yyerror("':' cannot be used with an other "
@@ -7728,7 +7726,7 @@ case 301:
}
break;
case 302:
-#line 3242 "../../freebsd/sbin/pfctl/parse.y"
+#line 3243 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.range.t || yystack.l_mark[0].v.range.t) {
yyerror("':' cannot be used with an other "
@@ -7746,7 +7744,7 @@ case 302:
}
break;
case 303:
-#line 3259 "../../freebsd/sbin/pfctl/parse.y"
+#line 3260 "../../freebsd/sbin/pfctl/parse.y"
{
if (parseport(yystack.l_mark[0].v.string, &yyval.v.range, 0) == -1) {
free(yystack.l_mark[0].v.string);
@@ -7756,7 +7754,7 @@ case 303:
}
break;
case 304:
-#line 3268 "../../freebsd/sbin/pfctl/parse.y"
+#line 3269 "../../freebsd/sbin/pfctl/parse.y"
{
if (parseport(yystack.l_mark[0].v.string, &yyval.v.range, PPORT_RANGE) == -1) {
free(yystack.l_mark[0].v.string);
@@ -7766,19 +7764,19 @@ case 304:
}
break;
case 305:
-#line 3277 "../../freebsd/sbin/pfctl/parse.y"
+#line 3278 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.uid = yystack.l_mark[0].v.uid; }
break;
case 306:
-#line 3278 "../../freebsd/sbin/pfctl/parse.y"
+#line 3279 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.uid = yystack.l_mark[-1].v.uid; }
break;
case 307:
-#line 3281 "../../freebsd/sbin/pfctl/parse.y"
+#line 3282 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.uid = yystack.l_mark[-1].v.uid; }
break;
case 308:
-#line 3282 "../../freebsd/sbin/pfctl/parse.y"
+#line 3283 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.uid->tail->next = yystack.l_mark[-1].v.uid;
yystack.l_mark[-3].v.uid->tail = yystack.l_mark[-1].v.uid;
@@ -7786,7 +7784,7 @@ case 308:
}
break;
case 309:
-#line 3289 "../../freebsd/sbin/pfctl/parse.y"
+#line 3290 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.uid = calloc(1, sizeof(struct node_uid));
if (yyval.v.uid == NULL)
@@ -7799,7 +7797,7 @@ case 309:
}
break;
case 310:
-#line 3299 "../../freebsd/sbin/pfctl/parse.y"
+#line 3300 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number == UID_MAX && yystack.l_mark[-1].v.i != PF_OP_EQ && yystack.l_mark[-1].v.i != PF_OP_NE) {
yyerror("user unknown requires operator = or "
@@ -7817,7 +7815,7 @@ case 310:
}
break;
case 311:
-#line 3314 "../../freebsd/sbin/pfctl/parse.y"
+#line 3315 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.number == UID_MAX || yystack.l_mark[0].v.number == UID_MAX) {
yyerror("user unknown requires operator = or "
@@ -7835,7 +7833,7 @@ case 311:
}
break;
case 312:
-#line 3331 "../../freebsd/sbin/pfctl/parse.y"
+#line 3332 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "unknown"))
yyval.v.number = UID_MAX;
@@ -7853,7 +7851,7 @@ case 312:
}
break;
case 313:
-#line 3346 "../../freebsd/sbin/pfctl/parse.y"
+#line 3347 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number >= UID_MAX) {
yyerror("illegal uid value %lu", yystack.l_mark[0].v.number);
@@ -7863,19 +7861,19 @@ case 313:
}
break;
case 314:
-#line 3355 "../../freebsd/sbin/pfctl/parse.y"
+#line 3356 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.gid = yystack.l_mark[0].v.gid; }
break;
case 315:
-#line 3356 "../../freebsd/sbin/pfctl/parse.y"
+#line 3357 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.gid = yystack.l_mark[-1].v.gid; }
break;
case 316:
-#line 3359 "../../freebsd/sbin/pfctl/parse.y"
+#line 3360 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.gid = yystack.l_mark[-1].v.gid; }
break;
case 317:
-#line 3360 "../../freebsd/sbin/pfctl/parse.y"
+#line 3361 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.gid->tail->next = yystack.l_mark[-1].v.gid;
yystack.l_mark[-3].v.gid->tail = yystack.l_mark[-1].v.gid;
@@ -7883,7 +7881,7 @@ case 317:
}
break;
case 318:
-#line 3367 "../../freebsd/sbin/pfctl/parse.y"
+#line 3368 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.gid = calloc(1, sizeof(struct node_gid));
if (yyval.v.gid == NULL)
@@ -7896,7 +7894,7 @@ case 318:
}
break;
case 319:
-#line 3377 "../../freebsd/sbin/pfctl/parse.y"
+#line 3378 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number == GID_MAX && yystack.l_mark[-1].v.i != PF_OP_EQ && yystack.l_mark[-1].v.i != PF_OP_NE) {
yyerror("group unknown requires operator = or "
@@ -7914,7 +7912,7 @@ case 319:
}
break;
case 320:
-#line 3392 "../../freebsd/sbin/pfctl/parse.y"
+#line 3393 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.number == GID_MAX || yystack.l_mark[0].v.number == GID_MAX) {
yyerror("group unknown requires operator = or "
@@ -7932,7 +7930,7 @@ case 320:
}
break;
case 321:
-#line 3409 "../../freebsd/sbin/pfctl/parse.y"
+#line 3410 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "unknown"))
yyval.v.number = GID_MAX;
@@ -7950,7 +7948,7 @@ case 321:
}
break;
case 322:
-#line 3424 "../../freebsd/sbin/pfctl/parse.y"
+#line 3425 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number >= GID_MAX) {
yyerror("illegal gid value %lu", yystack.l_mark[0].v.number);
@@ -7960,7 +7958,7 @@ case 322:
}
break;
case 323:
-#line 3433 "../../freebsd/sbin/pfctl/parse.y"
+#line 3434 "../../freebsd/sbin/pfctl/parse.y"
{
int f;
@@ -7974,39 +7972,39 @@ case 323:
}
break;
case 324:
-#line 3446 "../../freebsd/sbin/pfctl/parse.y"
+#line 3447 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = yystack.l_mark[-2].v.b.b1; yyval.v.b.b2 = yystack.l_mark[0].v.b.b1; }
break;
case 325:
-#line 3447 "../../freebsd/sbin/pfctl/parse.y"
+#line 3448 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = 0; yyval.v.b.b2 = yystack.l_mark[0].v.b.b1; }
break;
case 326:
-#line 3448 "../../freebsd/sbin/pfctl/parse.y"
+#line 3449 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = 0; yyval.v.b.b2 = 0; }
break;
case 327:
-#line 3451 "../../freebsd/sbin/pfctl/parse.y"
+#line 3452 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[0].v.icmp; }
break;
case 328:
-#line 3452 "../../freebsd/sbin/pfctl/parse.y"
+#line 3453 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[-1].v.icmp; }
break;
case 329:
-#line 3453 "../../freebsd/sbin/pfctl/parse.y"
+#line 3454 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[0].v.icmp; }
break;
case 330:
-#line 3454 "../../freebsd/sbin/pfctl/parse.y"
+#line 3455 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[-1].v.icmp; }
break;
case 331:
-#line 3457 "../../freebsd/sbin/pfctl/parse.y"
+#line 3458 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[-1].v.icmp; }
break;
case 332:
-#line 3458 "../../freebsd/sbin/pfctl/parse.y"
+#line 3459 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.icmp->tail->next = yystack.l_mark[-1].v.icmp;
yystack.l_mark[-3].v.icmp->tail = yystack.l_mark[-1].v.icmp;
@@ -8014,11 +8012,11 @@ case 332:
}
break;
case 333:
-#line 3465 "../../freebsd/sbin/pfctl/parse.y"
+#line 3466 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.icmp = yystack.l_mark[-1].v.icmp; }
break;
case 334:
-#line 3466 "../../freebsd/sbin/pfctl/parse.y"
+#line 3467 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.icmp->tail->next = yystack.l_mark[-1].v.icmp;
yystack.l_mark[-3].v.icmp->tail = yystack.l_mark[-1].v.icmp;
@@ -8026,7 +8024,7 @@ case 334:
}
break;
case 335:
-#line 3473 "../../freebsd/sbin/pfctl/parse.y"
+#line 3474 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.icmp = calloc(1, sizeof(struct node_icmp));
if (yyval.v.icmp == NULL)
@@ -8039,7 +8037,7 @@ case 335:
}
break;
case 336:
-#line 3483 "../../freebsd/sbin/pfctl/parse.y"
+#line 3484 "../../freebsd/sbin/pfctl/parse.y"
{
const struct icmpcodeent *p;
@@ -8061,7 +8059,7 @@ case 336:
}
break;
case 337:
-#line 3502 "../../freebsd/sbin/pfctl/parse.y"
+#line 3503 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > 255) {
yyerror("illegal icmp-code %lu", yystack.l_mark[0].v.number);
@@ -8078,7 +8076,7 @@ case 337:
}
break;
case 338:
-#line 3518 "../../freebsd/sbin/pfctl/parse.y"
+#line 3519 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.icmp = calloc(1, sizeof(struct node_icmp));
if (yyval.v.icmp == NULL)
@@ -8091,7 +8089,7 @@ case 338:
}
break;
case 339:
-#line 3528 "../../freebsd/sbin/pfctl/parse.y"
+#line 3529 "../../freebsd/sbin/pfctl/parse.y"
{
const struct icmpcodeent *p;
@@ -8113,7 +8111,7 @@ case 339:
}
break;
case 340:
-#line 3547 "../../freebsd/sbin/pfctl/parse.y"
+#line 3548 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > 255) {
yyerror("illegal icmp-code %lu", yystack.l_mark[0].v.number);
@@ -8130,7 +8128,7 @@ case 340:
}
break;
case 341:
-#line 3563 "../../freebsd/sbin/pfctl/parse.y"
+#line 3564 "../../freebsd/sbin/pfctl/parse.y"
{
const struct icmptypeent *p;
@@ -8144,7 +8142,7 @@ case 341:
}
break;
case 342:
-#line 3574 "../../freebsd/sbin/pfctl/parse.y"
+#line 3575 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > 255) {
yyerror("illegal icmp-type %lu", yystack.l_mark[0].v.number);
@@ -8154,7 +8152,7 @@ case 342:
}
break;
case 343:
-#line 3583 "../../freebsd/sbin/pfctl/parse.y"
+#line 3584 "../../freebsd/sbin/pfctl/parse.y"
{
const struct icmptypeent *p;
@@ -8169,7 +8167,7 @@ case 343:
}
break;
case 344:
-#line 3595 "../../freebsd/sbin/pfctl/parse.y"
+#line 3596 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > 255) {
yyerror("illegal icmp6-type %lu", yystack.l_mark[0].v.number);
@@ -8179,7 +8177,7 @@ case 344:
}
break;
case 345:
-#line 3604 "../../freebsd/sbin/pfctl/parse.y"
+#line 3605 "../../freebsd/sbin/pfctl/parse.y"
{
int val;
char *end;
@@ -8202,7 +8200,7 @@ case 345:
}
break;
case 346:
-#line 3624 "../../freebsd/sbin/pfctl/parse.y"
+#line 3625 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.number = yystack.l_mark[0].v.number;
if (yyval.v.number < 0 || yyval.v.number > 255) {
@@ -8212,85 +8210,85 @@ case 346:
}
break;
case 347:
-#line 3633 "../../freebsd/sbin/pfctl/parse.y"
+#line 3634 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_SRCTRACK; }
break;
case 348:
-#line 3634 "../../freebsd/sbin/pfctl/parse.y"
+#line 3635 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_SRCTRACK_GLOBAL; }
break;
case 349:
-#line 3635 "../../freebsd/sbin/pfctl/parse.y"
+#line 3636 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_SRCTRACK_RULE; }
break;
case 350:
-#line 3638 "../../freebsd/sbin/pfctl/parse.y"
+#line 3639 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.i = PFRULE_IFBOUND;
}
break;
case 351:
-#line 3641 "../../freebsd/sbin/pfctl/parse.y"
+#line 3642 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.i = 0;
}
break;
case 352:
-#line 3646 "../../freebsd/sbin/pfctl/parse.y"
+#line 3647 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.keep_state.action = 0;
yyval.v.keep_state.options = NULL;
}
break;
case 353:
-#line 3650 "../../freebsd/sbin/pfctl/parse.y"
+#line 3651 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.keep_state.action = PF_STATE_NORMAL;
yyval.v.keep_state.options = yystack.l_mark[0].v.state_opt;
}
break;
case 354:
-#line 3654 "../../freebsd/sbin/pfctl/parse.y"
+#line 3655 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.keep_state.action = PF_STATE_MODULATE;
yyval.v.keep_state.options = yystack.l_mark[0].v.state_opt;
}
break;
case 355:
-#line 3658 "../../freebsd/sbin/pfctl/parse.y"
+#line 3659 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.keep_state.action = PF_STATE_SYNPROXY;
yyval.v.keep_state.options = yystack.l_mark[0].v.state_opt;
}
break;
case 356:
-#line 3664 "../../freebsd/sbin/pfctl/parse.y"
+#line 3665 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; }
break;
case 357:
-#line 3665 "../../freebsd/sbin/pfctl/parse.y"
+#line 3666 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_FLUSH; }
break;
case 358:
-#line 3666 "../../freebsd/sbin/pfctl/parse.y"
+#line 3667 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.i = PF_FLUSH | PF_FLUSH_GLOBAL;
}
break;
case 359:
-#line 3671 "../../freebsd/sbin/pfctl/parse.y"
+#line 3672 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.state_opt = yystack.l_mark[-1].v.state_opt; }
break;
case 360:
-#line 3672 "../../freebsd/sbin/pfctl/parse.y"
+#line 3673 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.state_opt = NULL; }
break;
case 361:
-#line 3675 "../../freebsd/sbin/pfctl/parse.y"
+#line 3676 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.state_opt = yystack.l_mark[0].v.state_opt; }
break;
case 362:
-#line 3676 "../../freebsd/sbin/pfctl/parse.y"
+#line 3677 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-2].v.state_opt->tail->next = yystack.l_mark[0].v.state_opt;
yystack.l_mark[-2].v.state_opt->tail = yystack.l_mark[0].v.state_opt;
@@ -8298,7 +8296,7 @@ case 362:
}
break;
case 363:
-#line 3683 "../../freebsd/sbin/pfctl/parse.y"
+#line 3684 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("only positive values permitted");
@@ -8314,7 +8312,7 @@ case 363:
}
break;
case 364:
-#line 3696 "../../freebsd/sbin/pfctl/parse.y"
+#line 3697 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.state_opt = calloc(1, sizeof(struct node_state_opt));
if (yyval.v.state_opt == NULL)
@@ -8325,7 +8323,7 @@ case 364:
}
break;
case 365:
-#line 3704 "../../freebsd/sbin/pfctl/parse.y"
+#line 3705 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("only positive values permitted");
@@ -8341,7 +8339,7 @@ case 365:
}
break;
case 366:
-#line 3717 "../../freebsd/sbin/pfctl/parse.y"
+#line 3718 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("only positive values permitted");
@@ -8357,7 +8355,7 @@ case 366:
}
break;
case 367:
-#line 3730 "../../freebsd/sbin/pfctl/parse.y"
+#line 3731 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.number < 0 || yystack.l_mark[-2].v.number > UINT_MAX ||
yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
@@ -8375,7 +8373,7 @@ case 367:
}
break;
case 368:
-#line 3745 "../../freebsd/sbin/pfctl/parse.y"
+#line 3746 "../../freebsd/sbin/pfctl/parse.y"
{
if (strlen(yystack.l_mark[-2].v.string) >= PF_TABLE_NAME_SIZE) {
yyerror("table name '%s' too long", yystack.l_mark[-2].v.string);
@@ -8396,7 +8394,7 @@ case 368:
}
break;
case 369:
-#line 3763 "../../freebsd/sbin/pfctl/parse.y"
+#line 3764 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > UINT_MAX) {
yyerror("only positive values permitted");
@@ -8412,7 +8410,7 @@ case 369:
}
break;
case 370:
-#line 3776 "../../freebsd/sbin/pfctl/parse.y"
+#line 3777 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.state_opt = calloc(1, sizeof(struct node_state_opt));
if (yyval.v.state_opt == NULL)
@@ -8424,7 +8422,7 @@ case 370:
}
break;
case 371:
-#line 3785 "../../freebsd/sbin/pfctl/parse.y"
+#line 3786 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.state_opt = calloc(1, sizeof(struct node_state_opt));
if (yyval.v.state_opt == NULL)
@@ -8436,7 +8434,7 @@ case 371:
}
break;
case 372:
-#line 3794 "../../freebsd/sbin/pfctl/parse.y"
+#line 3795 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.state_opt = calloc(1, sizeof(struct node_state_opt));
if (yyval.v.state_opt == NULL)
@@ -8447,7 +8445,7 @@ case 372:
}
break;
case 373:
-#line 3802 "../../freebsd/sbin/pfctl/parse.y"
+#line 3803 "../../freebsd/sbin/pfctl/parse.y"
{
int i;
@@ -8480,42 +8478,42 @@ case 373:
}
break;
case 374:
-#line 3834 "../../freebsd/sbin/pfctl/parse.y"
+#line 3835 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.string = yystack.l_mark[0].v.string;
}
break;
case 375:
-#line 3839 "../../freebsd/sbin/pfctl/parse.y"
+#line 3840 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.qassign.qname = yystack.l_mark[0].v.string;
yyval.v.qassign.pqname = NULL;
}
break;
case 376:
-#line 3843 "../../freebsd/sbin/pfctl/parse.y"
+#line 3844 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.qassign.qname = yystack.l_mark[-1].v.string;
yyval.v.qassign.pqname = NULL;
}
break;
case 377:
-#line 3847 "../../freebsd/sbin/pfctl/parse.y"
+#line 3848 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.qassign.qname = yystack.l_mark[-3].v.string;
yyval.v.qassign.pqname = yystack.l_mark[-1].v.string;
}
break;
case 378:
-#line 3853 "../../freebsd/sbin/pfctl/parse.y"
+#line 3854 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 0; }
break;
case 379:
-#line 3854 "../../freebsd/sbin/pfctl/parse.y"
+#line 3855 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = 1; }
break;
case 380:
-#line 3857 "../../freebsd/sbin/pfctl/parse.y"
+#line 3858 "../../freebsd/sbin/pfctl/parse.y"
{
if (parseport(yystack.l_mark[0].v.string, &yyval.v.range, PPORT_RANGE|PPORT_STAR) == -1) {
free(yystack.l_mark[0].v.string);
@@ -8525,19 +8523,19 @@ case 380:
}
break;
case 381:
-#line 3866 "../../freebsd/sbin/pfctl/parse.y"
+#line 3867 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[0].v.host; }
break;
case 382:
-#line 3867 "../../freebsd/sbin/pfctl/parse.y"
+#line 3868 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 383:
-#line 3870 "../../freebsd/sbin/pfctl/parse.y"
+#line 3871 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 384:
-#line 3871 "../../freebsd/sbin/pfctl/parse.y"
+#line 3872 "../../freebsd/sbin/pfctl/parse.y"
{
yystack.l_mark[-3].v.host->tail->next = yystack.l_mark[-1].v.host;
yystack.l_mark[-3].v.host->tail = yystack.l_mark[-1].v.host->tail;
@@ -8545,11 +8543,11 @@ case 384:
}
break;
case 385:
-#line 3878 "../../freebsd/sbin/pfctl/parse.y"
+#line 3879 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.redirection = NULL; }
break;
case 386:
-#line 3879 "../../freebsd/sbin/pfctl/parse.y"
+#line 3880 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.redirection = calloc(1, sizeof(struct redirection));
if (yyval.v.redirection == NULL)
@@ -8559,7 +8557,7 @@ case 386:
}
break;
case 387:
-#line 3886 "../../freebsd/sbin/pfctl/parse.y"
+#line 3887 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.redirection = calloc(1, sizeof(struct redirection));
if (yyval.v.redirection == NULL)
@@ -8569,7 +8567,7 @@ case 387:
}
break;
case 388:
-#line 3896 "../../freebsd/sbin/pfctl/parse.y"
+#line 3897 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.hashkey = calloc(1, sizeof(struct pf_poolhashkey));
if (yyval.v.hashkey == NULL)
@@ -8581,7 +8579,7 @@ case 388:
}
break;
case 389:
-#line 3906 "../../freebsd/sbin/pfctl/parse.y"
+#line 3907 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strncmp(yystack.l_mark[0].v.string, "0x", 2)) {
if (strlen(yystack.l_mark[0].v.string) != 34) {
@@ -8621,22 +8619,22 @@ case 389:
}
break;
case 390:
-#line 3945 "../../freebsd/sbin/pfctl/parse.y"
+#line 3946 "../../freebsd/sbin/pfctl/parse.y"
{ bzero(&pool_opts, sizeof pool_opts); }
break;
case 391:
-#line 3947 "../../freebsd/sbin/pfctl/parse.y"
+#line 3948 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.pool_opts = pool_opts; }
break;
case 392:
-#line 3948 "../../freebsd/sbin/pfctl/parse.y"
+#line 3949 "../../freebsd/sbin/pfctl/parse.y"
{
bzero(&pool_opts, sizeof pool_opts);
yyval.v.pool_opts = pool_opts;
}
break;
case 395:
-#line 3958 "../../freebsd/sbin/pfctl/parse.y"
+#line 3959 "../../freebsd/sbin/pfctl/parse.y"
{
if (pool_opts.type) {
yyerror("pool type cannot be redefined");
@@ -8646,7 +8644,7 @@ case 395:
}
break;
case 396:
-#line 3965 "../../freebsd/sbin/pfctl/parse.y"
+#line 3966 "../../freebsd/sbin/pfctl/parse.y"
{
if (pool_opts.type) {
yyerror("pool type cannot be redefined");
@@ -8656,7 +8654,7 @@ case 396:
}
break;
case 397:
-#line 3972 "../../freebsd/sbin/pfctl/parse.y"
+#line 3973 "../../freebsd/sbin/pfctl/parse.y"
{
if (pool_opts.type) {
yyerror("pool type cannot be redefined");
@@ -8667,7 +8665,7 @@ case 397:
}
break;
case 398:
-#line 3980 "../../freebsd/sbin/pfctl/parse.y"
+#line 3981 "../../freebsd/sbin/pfctl/parse.y"
{
if (pool_opts.type) {
yyerror("pool type cannot be redefined");
@@ -8677,7 +8675,7 @@ case 398:
}
break;
case 399:
-#line 3987 "../../freebsd/sbin/pfctl/parse.y"
+#line 3988 "../../freebsd/sbin/pfctl/parse.y"
{
if (pool_opts.staticport) {
yyerror("static-port cannot be redefined");
@@ -8687,7 +8685,7 @@ case 399:
}
break;
case 400:
-#line 3994 "../../freebsd/sbin/pfctl/parse.y"
+#line 3995 "../../freebsd/sbin/pfctl/parse.y"
{
if (filter_opts.marker & POM_STICKYADDRESS) {
yyerror("sticky-address cannot be redefined");
@@ -8698,11 +8696,11 @@ case 400:
}
break;
case 401:
-#line 4004 "../../freebsd/sbin/pfctl/parse.y"
+#line 4005 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.redirection = NULL; }
break;
case 402:
-#line 4005 "../../freebsd/sbin/pfctl/parse.y"
+#line 4006 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.redirection = calloc(1, sizeof(struct redirection));
if (yyval.v.redirection == NULL)
@@ -8712,7 +8710,7 @@ case 402:
}
break;
case 403:
-#line 4012 "../../freebsd/sbin/pfctl/parse.y"
+#line 4013 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.redirection = calloc(1, sizeof(struct redirection));
if (yyval.v.redirection == NULL)
@@ -8722,23 +8720,23 @@ case 403:
}
break;
case 404:
-#line 4021 "../../freebsd/sbin/pfctl/parse.y"
+#line 4022 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = yyval.v.b.b2 = 0; yyval.v.b.w2 = 0; }
break;
case 405:
-#line 4022 "../../freebsd/sbin/pfctl/parse.y"
+#line 4023 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = 1; yyval.v.b.b2 = 0; yyval.v.b.w2 = 0; }
break;
case 406:
-#line 4023 "../../freebsd/sbin/pfctl/parse.y"
+#line 4024 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = 1; yyval.v.b.b2 = yystack.l_mark[0].v.logquick.log; yyval.v.b.w2 = yystack.l_mark[0].v.logquick.logif; }
break;
case 407:
-#line 4024 "../../freebsd/sbin/pfctl/parse.y"
+#line 4025 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.b.b1 = 0; yyval.v.b.b2 = yystack.l_mark[0].v.logquick.log; yyval.v.b.w2 = yystack.l_mark[0].v.logquick.logif; }
break;
case 408:
-#line 4027 "../../freebsd/sbin/pfctl/parse.y"
+#line 4028 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.i && yystack.l_mark[0].v.b.b1) {
yyerror("\"pass\" not valid with \"no\"");
@@ -8754,7 +8752,7 @@ case 408:
}
break;
case 409:
-#line 4040 "../../freebsd/sbin/pfctl/parse.y"
+#line 4041 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-2].v.i && yystack.l_mark[0].v.b.b1) {
yyerror("\"pass\" not valid with \"no\"");
@@ -8770,7 +8768,7 @@ case 409:
}
break;
case 410:
-#line 4057 "../../freebsd/sbin/pfctl/parse.y"
+#line 4058 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule r;
@@ -8928,7 +8926,7 @@ case 410:
}
break;
case 411:
-#line 4216 "../../freebsd/sbin/pfctl/parse.y"
+#line 4217 "../../freebsd/sbin/pfctl/parse.y"
{
struct pf_rule binat;
struct pf_pooladdr *pa;
@@ -9094,27 +9092,27 @@ case 411:
}
break;
case 412:
-#line 4381 "../../freebsd/sbin/pfctl/parse.y"
+#line 4382 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.string = NULL; }
break;
case 413:
-#line 4382 "../../freebsd/sbin/pfctl/parse.y"
+#line 4383 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.string = yystack.l_mark[0].v.string; }
break;
case 414:
-#line 4385 "../../freebsd/sbin/pfctl/parse.y"
+#line 4386 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.tagged.neg = 0; yyval.v.tagged.name = NULL; }
break;
case 415:
-#line 4386 "../../freebsd/sbin/pfctl/parse.y"
+#line 4387 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.tagged.neg = yystack.l_mark[-2].v.number; yyval.v.tagged.name = yystack.l_mark[0].v.string; }
break;
case 416:
-#line 4389 "../../freebsd/sbin/pfctl/parse.y"
+#line 4390 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.rtableid = -1; }
break;
case 417:
-#line 4390 "../../freebsd/sbin/pfctl/parse.y"
+#line 4391 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[0].v.number < 0 || yystack.l_mark[0].v.number > rt_tableid_max()) {
yyerror("invalid rtable id");
@@ -9124,7 +9122,7 @@ case 417:
}
break;
case 418:
-#line 4399 "../../freebsd/sbin/pfctl/parse.y"
+#line 4400 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.host = calloc(1, sizeof(struct node_host));
if (yyval.v.host == NULL)
@@ -9136,18 +9134,18 @@ case 418:
}
break;
case 419:
-#line 4408 "../../freebsd/sbin/pfctl/parse.y"
+#line 4409 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.host = yystack.l_mark[-1].v.host;
yyval.v.host->ifname = yystack.l_mark[-2].v.string;
}
break;
case 420:
-#line 4414 "../../freebsd/sbin/pfctl/parse.y"
+#line 4415 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 421:
-#line 4415 "../../freebsd/sbin/pfctl/parse.y"
+#line 4416 "../../freebsd/sbin/pfctl/parse.y"
{
if (yystack.l_mark[-3].v.host->af == 0)
yystack.l_mark[-3].v.host->af = yystack.l_mark[-1].v.host->af;
@@ -9162,15 +9160,15 @@ case 421:
}
break;
case 422:
-#line 4429 "../../freebsd/sbin/pfctl/parse.y"
+#line 4430 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[0].v.host; }
break;
case 423:
-#line 4430 "../../freebsd/sbin/pfctl/parse.y"
+#line 4431 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.host = yystack.l_mark[-1].v.host; }
break;
case 424:
-#line 4433 "../../freebsd/sbin/pfctl/parse.y"
+#line 4434 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.route.host = NULL;
yyval.v.route.rt = 0;
@@ -9178,7 +9176,7 @@ case 424:
}
break;
case 425:
-#line 4438 "../../freebsd/sbin/pfctl/parse.y"
+#line 4439 "../../freebsd/sbin/pfctl/parse.y"
{
/* backwards-compat */
yyval.v.route.host = NULL;
@@ -9187,7 +9185,7 @@ case 425:
}
break;
case 426:
-#line 4444 "../../freebsd/sbin/pfctl/parse.y"
+#line 4445 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.route.host = yystack.l_mark[-1].v.host;
yyval.v.route.rt = PF_ROUTETO;
@@ -9197,7 +9195,7 @@ case 426:
}
break;
case 427:
-#line 4451 "../../freebsd/sbin/pfctl/parse.y"
+#line 4452 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.route.host = yystack.l_mark[-1].v.host;
yyval.v.route.rt = PF_REPLYTO;
@@ -9207,7 +9205,7 @@ case 427:
}
break;
case 428:
-#line 4458 "../../freebsd/sbin/pfctl/parse.y"
+#line 4459 "../../freebsd/sbin/pfctl/parse.y"
{
yyval.v.route.host = yystack.l_mark[-1].v.host;
yyval.v.route.rt = PF_DUPTO;
@@ -9217,7 +9215,7 @@ case 428:
}
break;
case 429:
-#line 4468 "../../freebsd/sbin/pfctl/parse.y"
+#line 4469 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION)) {
free(yystack.l_mark[-1].v.string);
@@ -9236,7 +9234,7 @@ case 429:
}
break;
case 430:
-#line 4484 "../../freebsd/sbin/pfctl/parse.y"
+#line 4485 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION))
YYERROR;
@@ -9249,7 +9247,7 @@ case 430:
}
break;
case 433:
-#line 4501 "../../freebsd/sbin/pfctl/parse.y"
+#line 4502 "../../freebsd/sbin/pfctl/parse.y"
{
if (check_rulestate(PFCTL_STATE_OPTION)) {
free(yystack.l_mark[-1].v.string);
@@ -9268,11 +9266,11 @@ case 433:
}
break;
case 438:
-#line 4527 "../../freebsd/sbin/pfctl/parse.y"
+#line 4528 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.number = 0; }
break;
case 439:
-#line 4528 "../../freebsd/sbin/pfctl/parse.y"
+#line 4529 "../../freebsd/sbin/pfctl/parse.y"
{
if (!strcmp(yystack.l_mark[0].v.string, "yes"))
yyval.v.number = 1;
@@ -9286,30 +9284,30 @@ case 439:
}
break;
case 440:
-#line 4541 "../../freebsd/sbin/pfctl/parse.y"
+#line 4542 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_EQ; }
break;
case 441:
-#line 4542 "../../freebsd/sbin/pfctl/parse.y"
+#line 4543 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_NE; }
break;
case 442:
-#line 4543 "../../freebsd/sbin/pfctl/parse.y"
+#line 4544 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_LE; }
break;
case 443:
-#line 4544 "../../freebsd/sbin/pfctl/parse.y"
+#line 4545 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_LT; }
break;
case 444:
-#line 4545 "../../freebsd/sbin/pfctl/parse.y"
+#line 4546 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_GE; }
break;
case 445:
-#line 4546 "../../freebsd/sbin/pfctl/parse.y"
+#line 4547 "../../freebsd/sbin/pfctl/parse.y"
{ yyval.v.i = PF_OP_GT; }
break;
-#line 9313 "pfctly.tab.c"
+#line 9311 "pfctly.tab.c"
}
yystack.s_mark -= yym;
yystate = *yystack.s_mark;
@@ -9327,11 +9325,12 @@ break;
*++yystack.l_mark = yyval;
if (yychar < 0)
{
- if ((yychar = YYLEX) < 0) yychar = YYEOF;
+ yychar = YYLEX;
+ if (yychar < 0) yychar = YYEOF;
#if YYDEBUG
if (yydebug)
{
- yys = yyname[YYTRANSLATE(yychar)];
+ if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
printf("%sdebug: state %d, reading %d (%s)\n",
YYPREFIX, YYFINAL, yychar, yys);
}
@@ -9340,8 +9339,8 @@ break;
if (yychar == YYEOF) goto yyaccept;
goto yyloop;
}
- if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
- yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
yystate = yytable[yyn];
else
yystate = yydgoto[yym];
@@ -9350,10 +9349,7 @@ break;
printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
#endif
- if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
- {
- goto yyoverflow;
- }
+ if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
*++yystack.s_mark = (YYINT) yystate;
*++yystack.l_mark = yyval;
goto yyloop;
diff --git a/freebsd/sbin/pfctl/parse.y b/freebsd/sbin/pfctl/parse.y
index 78ca561c..00e77118 100644
--- a/freebsd/sbin/pfctl/parse.y
+++ b/freebsd/sbin/pfctl/parse.y
@@ -29,6 +29,7 @@
%{
#ifdef __rtems__
#include <machine/rtems-bsd-user-space.h>
+#undef INET6
#endif /* __rtems__ */
#ifdef __rtems__
--
2.13.6
More information about the devel
mailing list