summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Pechkin <mpech@cvs.openbsd.org>2002-10-16 09:00:07 +0000
committerMike Pechkin <mpech@cvs.openbsd.org>2002-10-16 09:00:07 +0000
commit54d0916a9ff1df480e975f346c892b842ee425c7 (patch)
treeb8a5f88140c09523d091f93eafc1311633a9af62 /sbin
parent2c1f179bdb308fd439c4fc20bb3c3f7fc802cc67 (diff)
Fix and improve binat mask comparison.
dhartmei@, henning@ ok
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y6
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index cf7c1dffe7a..e56b12cbb72 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.168 2002/10/14 12:58:28 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.169 2002/10/16 09:00:06 mpech Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1548,9 +1548,7 @@ binatrule : no BINAT interface af proto FROM host TO ipspec redirection
sizeof(binat.raddr.addr));
memcpy(&binat.rmask, &n->mask,
sizeof(binat.rmask));
- if (!PF_AZERO(&binat.smask, binat.af) &&
- !PF_AEQ(&binat.smask,
- &binat.rmask, binat.af)) {
+ if (PF_ANEQ(&binat.smask, &binat.rmask, binat.af)) {
yyerror("'binat' source mask and "
"redirect mask must be the same");
YYERROR;