From 78b0a8b0a2c17a3fff5fb909f0b1ba76df42bd87 Mon Sep 17 00:00:00 2001 From: Chris Cappuccio Date: Fri, 6 Jul 2001 22:22:46 +0000 Subject: theo requests less archaic style --- sys/net/pf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/net/pf.c') 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)) && -- cgit v1.2.3