summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>2000-07-03 04:50:06 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>2000-07-03 04:50:06 +0000
commiteb9c0ff585d2e7d471d66b411a6de67434fb6a82 (patch)
tree88ecbcfd7edc501d6bd984196e38a234b809ab37 /sys
parent1d2e65d31dea55ceaa861df95da29e74227bc118 (diff)
Make nat_ifdetach() actually work; beck@ ok
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_nat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/ip_nat.c b/sys/netinet/ip_nat.c
index 15ab3908c88..6bf634f9c9c 100644
--- a/sys/netinet/ip_nat.c
+++ b/sys/netinet/ip_nat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_nat.c,v 1.32 2000/05/24 21:59:11 kjell Exp $ */
+/* $OpenBSD: ip_nat.c,v 1.33 2000/07/03 04:50:05 aaron Exp $ */
/*
* Copyright (C) 1995-1998 by Darren Reed.
@@ -614,9 +614,9 @@ void
nat_ifdetach(ifp)
struct ifnet *ifp;
{
- ipnat_t *n, **np;
+ ipnat_t *n, **np = &nat_list;
- for (np = &nat_list; (n = *np) != NULL; np = &n->in_next) {
+ while ((n = *np)) {
*np = n->in_next;
if (!n->in_use) {
if (n->in_apr)
@@ -627,7 +627,6 @@ nat_ifdetach(ifp)
n->in_flags |= IPN_DELETE;
n->in_next = NULL;
}
- n = NULL;
}
}