==== //depot/user/bms/netdev/sys/net/if.c#10 - /home/bms/p4/netdev/sys/net/if.c ==== --- /tmp/tmp.1084.0 Mon Mar 26 17:18:47 2007 +++ /home/bms/p4/netdev/sys/net/if.c Mon Mar 26 17:18:33 2007 @@ -2513,19 +2513,19 @@ * If the ifnet is detaching, null out references to ifnet, * so that upper protocol layers will notice, and not attempt * to obtain locks for an ifnet which no longer exists. - * It is OK to call rt_newmaddrmsg() with a NULL ifp. + * XXX: rt_newaddrmsg() needs to be called before the ifnet instance + * is detached from the system interface list. */ if (detaching) { #ifdef DIAGNOSTIC printf("%s: detaching ifnet instance %p\n", __func__, ifp); #endif + rt_newmaddrmsg(RTM_DELMADDR, ifma); ifma->ifma_ifp = NULL; } if (--ifma->ifma_refcount > 0) return 0; - - rt_newmaddrmsg(RTM_DELMADDR, ifma); /* * If this ifma is a network-layer ifma, a link-layer ifma may