summaryrefslogtreecommitdiff
path: root/sbin/pfctl/parse.y
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-12-18 08:01:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-12-18 08:01:48 +0000
commitd2fb7c640950737318202e01e4393304f5b3af6f (patch)
tree162b3144f062b2440bc344300c90c6a1e4365c8e /sbin/pfctl/parse.y
parent4232bc1a3069d85b27e24598bcb12765d013e1f3 (diff)
fix some INCREDIBLE new bugs which were introduced
Diffstat (limited to 'sbin/pfctl/parse.y')
-rw-r--r--sbin/pfctl/parse.y13
1 files changed, 4 insertions, 9 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index efe7c933627..67fe1752785 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.261 2002/12/17 20:06:05 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.262 2002/12/18 08:01:47 deraadt Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -520,7 +520,6 @@ anchorrule : ANCHOR string dir interface af proto fromto {
YYERROR;
PREPARE_ANCHOR_RULE(r, $2);
-
r.direction = $3;
r.af = $5;
@@ -534,12 +533,11 @@ anchorrule : ANCHOR string dir interface af proto fromto {
| NATANCHOR string interface af proto fromto {
struct pf_rule r;
- r.action = PF_NAT;
if (check_rulestate(PFCTL_STATE_NAT))
YYERROR;
PREPARE_ANCHOR_RULE(r, $2);
-
+ r.action = PF_NAT;
r.af = $4;
decide_address_family($6.src.host, &r.af);
@@ -551,13 +549,11 @@ anchorrule : ANCHOR string dir interface af proto fromto {
| RDRANCHOR string interface af proto fromto {
struct pf_rule r;
- r.action = PF_RDR;
- if (check_rulestate(PFCTL_STATE_NAT))
if (check_rulestate(PFCTL_STATE_NAT))
YYERROR;
PREPARE_ANCHOR_RULE(r, $2);
-
+ r.action = PF_RDR;
r.af = $4;
decide_address_family($6.src.host, &r.af);
@@ -568,12 +564,11 @@ anchorrule : ANCHOR string dir interface af proto fromto {
| BINATANCHOR string interface af proto fromto {
struct pf_rule r;
- r.action = PF_NAT;
if (check_rulestate(PFCTL_STATE_NAT))
YYERROR;
PREPARE_ANCHOR_RULE(r, $2);
-
+ r.action = PF_NAT;
r.af = $4;
decide_address_family($6.src.host, &r.af);