summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordhartmei <dhartmei@openbsd.org>2002-06-24 10:55:08 +0000
committerdhartmei <dhartmei@openbsd.org>2002-06-24 10:55:08 +0000
commitaa342372e9f473734d02a7ca41c3a5fc69ea3730 (patch)
tree05b47c284629cf7658a1605d4ee5e4080b63dcda
parentAdd xfs device; seems to work. (diff)
downloadwireguard-openbsd-aa342372e9f473734d02a7ca41c3a5fc69ea3730.tar.xz
wireguard-openbsd-aa342372e9f473734d02a7ca41c3a5fc69ea3730.zip
Use interface when specified in scrub rule. No support for ! or {} yet.
-rw-r--r--sbin/pfctl/parse.y15
1 files changed, 14 insertions, 1 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 41951cad855..7385c750da5 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.105 2002/06/23 03:07:21 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.106 2002/06/24 10:55:08 dhartmei Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -270,6 +270,19 @@ scrubrule : SCRUB dir interface fromto nodf minttl maxmss fragcache
r.action = PF_SCRUB;
r.direction = $2;
+ if ($3) {
+ if ($3->not) {
+ yyerror("scrub rules don't support "
+ "'! <if>'");
+ YYERROR;
+ } else if ($3->next) {
+ yyerror("scrub rules don't support "
+ "{} expansion");
+ YYERROR;
+ }
+ memcpy(r.ifname, $3->ifname,
+ sizeof(r.ifname));
+ }
if ($5)
r.rule_flag |= PFRULE_NODF;
if ($6)