summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-05-13 19:49:33 +0000
committerdm <dm@cvs.openbsd.org>1996-05-13 19:49:33 +0000
commit1224bac5b15e609f7a9a290db76f75adc57a6bd0 (patch)
tree40f2f3c6ce21cb8ad0fc7e74fe4ebc2b185a2de5 /sys
parent417697b9a38e31c0c0ed13d77c2f1d8add24c300 (diff)
fix return-rst
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/fil.c2
-rw-r--r--sys/netinet/ip_nat.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/sys/netinet/fil.c b/sys/netinet/fil.c
index f6b57de9870..f84114c3239 100644
--- a/sys/netinet/fil.c
+++ b/sys/netinet/fil.c
@@ -639,7 +639,7 @@ int out;
frstats[0].fr_ret++;
} else if (pass & FR_RETRST &&
- (fin->fin_fi.fi_fl & FI_SHORT)) {
+ !(fin->fin_fi.fi_fl & FI_SHORT)) {
if (SEND_RESET(ip, qif, q) == 0)
frstats[1].fr_ret++;
}
diff --git a/sys/netinet/ip_nat.c b/sys/netinet/ip_nat.c
index 26c7c737032..34c91987124 100644
--- a/sys/netinet/ip_nat.c
+++ b/sys/netinet/ip_nat.c
@@ -209,13 +209,10 @@ int direction;
dport = tcp->th_dport;
}
- MUTEX_ENTER(&ipf_nat);
-
/* Give me a new nat */
- if (!(nat = (nat_t *)KMALLOC(sizeof(*nat)))) {
- MUTEX_EXIT(&ipf_nat);
+ if (!(nat = (nat_t *)KMALLOC(sizeof(*nat))))
return NULL;
- }
+
/*
* Search the current table for a match.
@@ -342,7 +339,6 @@ int direction;
nat_stats.ns_added++;
nat_inuse++;
- MUTEX_EXIT(&ipf_nat);
return nat;
}