summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2000-08-10 15:43:21 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2000-08-10 15:43:21 +0000
commit7e2c38de45da65021e4c2874229ff0f0161421e1 (patch)
tree1fc6fda4aa02576c8cfa6dfdfbdfce9a7e0db82d /sys/netinet
parenteacd9d997fc9fbec0a0600e99e933e14d94c1741 (diff)
Whoops. Reapply Aaron's detach code fix. inadvertantly whacked in the
3.3.18 import.
Diffstat (limited to 'sys/netinet')
-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 a6283e04d34..c618c90ff7b 100644
--- a/sys/netinet/ip_nat.c
+++ b/sys/netinet/ip_nat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_nat.c,v 1.34 2000/08/10 05:50:26 kjell Exp $ */
+/* $OpenBSD: ip_nat.c,v 1.35 2000/08/10 15:43:20 kjell 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;
}
}