* On interface removal, clean up IPv4 data structures hung off of the ifnet. */
| 1182 | * On interface removal, clean up IPv4 data structures hung off of the ifnet. |
| 1183 | */ |
| 1184 | void |
| 1185 | in_ifdetach(struct ifnet *ifp) |
| 1186 | { |
| 1187 | IN_MULTI_LOCK(); |
| 1188 | in_pcbpurgeif0(&V_ripcbinfo, ifp); |
| 1189 | in_pcbpurgeif0(&V_udbinfo, ifp); |
| 1190 | in_pcbpurgeif0(&V_ulitecbinfo, ifp); |
| 1191 | in_purgemaddrs(ifp); |
| 1192 | IN_MULTI_UNLOCK(); |
| 1193 | |
| 1194 | /* |
| 1195 | * Make sure all multicast deletions invoking if_ioctl() are |
| 1196 | * completed before returning. Else we risk accessing a freed |
| 1197 | * ifnet structure pointer. |
| 1198 | */ |
| 1199 | inm_release_wait(NULL); |
| 1200 | } |
| 1201 | |
| 1202 | /* |
| 1203 | * Delete all IPv4 multicast address records, and associated link-layer |
no test coverage detected