diff options
author | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-06-24 10:55:09 +0000 |
---|---|---|
committer | Daniel Hartmeier <dhartmei@cvs.openbsd.org> | 2002-06-24 10:55:09 +0000 |
commit | fe34a85cc34f0735a3cc9473cc67c8bfd2065ccf (patch) | |
tree | 78da1618a4b19d45d8492069a95a17d73c29dd49 /sbin | |
parent | e60358d9edfb832a816cc7d49b594b54e4ba46fe (diff) |
Use interface when specified in scrub rule. No support for ! or {} yet.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/pfctl/parse.y | 15 |
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) |