summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-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;
}