summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2001-07-06 22:22:46 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2001-07-06 22:22:46 +0000
commit78b0a8b0a2c17a3fff5fb909f0b1ba76df42bd87 (patch)
treeff33788383286b385522b22cef841f4e28fb3e25 /sys/net/pf.c
parent0bb2185513c1c1309c0955fa8c3f1d77e9b6ca0b (diff)
theo requests less archaic style
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index fc7b9c230c1..d265d87b32c 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.102 2001/07/06 22:09:00 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.103 2001/07/06 22:22:45 chris Exp $ */
/*
* Copyright (c) 2001, Daniel Hartmeier
@@ -1362,7 +1362,8 @@ pf_get_nat(struct ifnet *ifp, u_int8_t proto, u_int32_t addr)
n = TAILQ_FIRST(pf_nats_active);
while (n && nm == NULL) {
- if (((n->ifp == ifp) == !n->ifnot) &&
+ if (((n->ifp == ifp && !n->ifnot) ||
+ (n->ifp != ifp && n->ifnot)) &&
(!n->proto || n->proto == proto) &&
pf_match_addr(n->not, n->saddr, n->smask, addr))
nm = n;
@@ -1379,7 +1380,8 @@ pf_get_rdr(struct ifnet *ifp, u_int8_t proto, u_int32_t addr, u_int16_t port)
r = TAILQ_FIRST(pf_rdrs_active);
while (r && rm == NULL) {
- if (((r->ifp == ifp) == !r->ifnot) &&
+ if (((r->ifp == ifp && !r->ifnot) ||
+ (r->ifp != ifp && r->ifnot)) &&
(!r->proto || r->proto == proto) &&
pf_match_addr(r->not, r->daddr, r->dmask, addr) &&
(ntohs(port) >= ntohs(r->dport)) &&