+#ifndef __APPLE__
+ /*
+ * in_ifadown gets rid of all the rest of
+ * the routes. This is not quite the right
+ * thing to do, but at least if we are running
+ * a routing process they will come back.
+ */
+ in_ifadown(&ia->ia_ifa, 1);
+ /*
+ * XXX horrible hack to detect that we are being called
+ * from if_detach()
+ */
+ if (!ifnet_addrs[ifp->if_index - 1]) {
+ in_pcbpurgeif0(LIST_FIRST(ripcbinfo.listhead), ifp);
+ in_pcbpurgeif0(LIST_FIRST(udbinfo.listhead), ifp);
+ }
+#endif
+