summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-27 16:36:26 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-27 16:36:26 +0000
commit6325e228da3137e2083529282114e3f41f4f802e (patch)
tree5d8dce813c58bc22322f27adfa2e05315205ce68 /sys
parentf813f5a5d374b41239cd8a84dbf778b34dbc2ba3 (diff)
move nat_ifdetach() after interface is removed from the list; avalon@coombs.anu.edu.au
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index bc75ef96a4e..e9a22bddc07 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.21 1999/08/08 14:59:02 niklas Exp $ */
+/* $OpenBSD: if.c,v 1.22 1999/10/27 16:36:25 deraadt Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -252,12 +252,6 @@ if_detach(ifp)
vif_delete(ifp);
#endif
#endif
-
-#ifdef IPFILTER
- /* XXX More ipf & ipnat cleanup needed. */
- nat_ifdetach(ifp);
-#endif
-
/*
* XXX transient ifp refs? inpcb.ip_moptions.imo_multicast_ifp?
* Other network stacks than INET?
@@ -266,6 +260,11 @@ if_detach(ifp)
/* Remove the interface from the list of all interfaces. */
TAILQ_REMOVE(&ifnet, ifp, if_list);
+#ifdef IPFILTER
+ /* XXX More ipf & ipnat cleanup needed. */
+ nat_ifdetach(ifp);
+#endif
+
/* Deallocate private resources. */
for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa;
ifa = TAILQ_FIRST(&ifp->if_addrlist)) {