summaryrefslogtreecommitdiff
path: root/sys/net/pf.c
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-19 10:49:55 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2002-12-19 10:49:55 +0000
commit50f6f4d768f0ccc673b51468c3920a605cbdc28b (patch)
tree8769877e5396628151112759fd7fbe460c1bf05f /sys/net/pf.c
parenta5614b9fe0efc9b7c640b278586e787d6f5ec980 (diff)
Initialize pf_state.nat_rule to NULL if there's no translation used.
Found by markus@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r--sys/net/pf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index b129bb52590..f95c24e2493 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.277 2002/12/18 19:40:41 dhartmei Exp $ */
+/* $OpenBSD: pf.c,v 1.278 2002/12/19 10:49:54 dhartmei Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1932,7 +1932,7 @@ pf_test_tcp(struct pf_rule **rm, int direction, struct ifnet *ifp,
s->rule.ptr = rs;
if (nat != NULL)
s->nat_rule = nat;
- else if (rdr != NULL)
+ else
s->nat_rule = rdr;
if (s->nat_rule != NULL)
s->nat_rule->states++;
@@ -2177,7 +2177,7 @@ pf_test_udp(struct pf_rule **rm, int direction, struct ifnet *ifp,
s->rule.ptr = rs;
if (nat != NULL)
s->nat_rule = nat;
- else if (rdr != NULL)
+ else
s->nat_rule = rdr;
if (s->nat_rule != NULL)
s->nat_rule->states++;
@@ -2423,7 +2423,7 @@ pf_test_icmp(struct pf_rule **rm, int direction, struct ifnet *ifp,
s->rule.ptr = rs;
if (nat != NULL)
s->nat_rule = nat;
- else if (rdr != NULL)
+ else
s->nat_rule = rdr;
if (s->nat_rule != NULL)
s->nat_rule->states++;
@@ -2616,7 +2616,7 @@ pf_test_other(struct pf_rule **rm, int direction, struct ifnet *ifp,
s->rule.ptr = rs;
if (nat != NULL)
s->nat_rule = nat;
- else if (rdr != NULL)
+ else
s->nat_rule = rdr;
if (s->nat_rule != NULL)
s->nat_rule->states++;