diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-02-12 15:16:03 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-02-12 15:16:03 +0000 |
commit | 3d63e6acd39f605f21fd94f86d4507c750b1bf59 (patch) | |
tree | 17ccc27f5c387d9f2e36a864ad5f2052cea4efe8 /sys | |
parent | b6da3410a97e83cb240f85b8a23f6f2a821b7fb5 (diff) |
protect ip_natexpire
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_nat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/ip_nat.c b/sys/netinet/ip_nat.c index 17416db0c86..2a49950f50e 100644 --- a/sys/netinet/ip_nat.c +++ b/sys/netinet/ip_nat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_nat.c,v 1.8 1997/02/11 22:23:25 kstailey Exp $ */ +/* $OpenBSD: ip_nat.c,v 1.9 1997/02/12 15:16:02 kstailey Exp $ */ /* * (C)opyright 1995-1996 by Darren Reed. * @@ -899,8 +899,10 @@ void ip_natexpire() { register struct nat *nat, **natp; + int s; MUTEX_ENTER(&ipf_nat); + SPLNET(s); for (natp = &nat_instances; (nat = *natp); natp = &nat->nat_next) { if (--nat->nat_age) continue; @@ -908,5 +910,6 @@ ip_natexpire() nat_delete(nat); nat_stats.ns_expire++; } + SPLX(s); MUTEX_EXIT(&ipf_nat); } |