Permalink
Browse files

defer if_free_sadl() at the end of if_detach(), as many of routing table

manipulation code assumes that there's AF_LINK sockaddr.  sync w/ netbsd-current
  • Loading branch information...
1 parent 906cd35 commit 7f220d18cf84c739eb3c1cff0a85fa55030e05a5 itojun committed May 23, 2003
View
2 netbsd/sys/net/if_ethersubr.c
@@ -1122,7 +1122,9 @@ ether_ifdetach(struct ifnet *ifp)
}
splx(s);
+#if 0 /* done in if_detach() */
if_free_sadl(ifp);
+#endif
}
#if 0
View
2 netbsd/sys/net/if_ieee1394subr.c
@@ -677,7 +677,9 @@ ieee1394_ifdetach(struct ifnet *ifp)
#endif
free(ifp->if_broadcastaddr, M_DEVBUF);
ifp->if_broadcastaddr = NULL;
+#if 0 /* done in if_detach() */
if_free_sadl(ifp);
+#endif
}
int
View
2 netbsd/sys/net/if_spppsubr.c
@@ -997,7 +997,9 @@ sppp_detach(struct ifnet *ifp)
if (sp->hisauth.name) free(sp->hisauth.name, M_DEVBUF);
if (sp->hisauth.secret) free(sp->hisauth.secret, M_DEVBUF);
+#if 0 /* done in if_detach() */
if_free_sadl(ifp);
+#endif
}
/*
View
2 netbsd/sys/net/if_tokensubr.c
@@ -725,5 +725,7 @@ token_ifdetach(ifp)
#if NBPFILTER > 0
bpfdetach(ifp);
#endif
+#if 0 /* done in if_detach() */
if_free_sadl(ifp);
+#endif
}

0 comments on commit 7f220d1

Please sign in to comment.