Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/in.c
Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
in_ifdetach(struct ifnet *ifp) | in_ifdetach(struct ifnet *ifp) | ||||
{ | { | ||||
IN_MULTI_LOCK(); | IN_MULTI_LOCK(); | ||||
in_pcbpurgeif0(&V_ripcbinfo, ifp); | in_pcbpurgeif0(&V_ripcbinfo, ifp); | ||||
in_pcbpurgeif0(&V_udbinfo, ifp); | in_pcbpurgeif0(&V_udbinfo, ifp); | ||||
in_pcbpurgeif0(&V_ulitecbinfo, ifp); | in_pcbpurgeif0(&V_ulitecbinfo, ifp); | ||||
in_purgemaddrs(ifp); | in_purgemaddrs(ifp); | ||||
IN_MULTI_UNLOCK(); | IN_MULTI_UNLOCK(); | ||||
/* | |||||
* Make sure all multicast deletions invoking if_ioctl() are | |||||
* completed before returning. Else we risk accessing a freed | |||||
* ifnet structure pointer. | |||||
*/ | |||||
inm_release_wait(NULL); | |||||
} | } | ||||
/* | /* | ||||
* Delete all IPv4 multicast address records, and associated link-layer | * Delete all IPv4 multicast address records, and associated link-layer | ||||
* multicast address records, associated with ifp. | * multicast address records, associated with ifp. | ||||
* XXX It looks like domifdetach runs AFTER the link layer cleanup. | * XXX It looks like domifdetach runs AFTER the link layer cleanup. | ||||
* XXX This should not race with ifma_protospec being set during | * XXX This should not race with ifma_protospec being set during | ||||
* a new allocation, if it does, we have bigger problems. | * a new allocation, if it does, we have bigger problems. | ||||
▲ Show 20 Lines • Show All 505 Lines • Show Last 20 Lines |