| 487 | } |
| 488 | |
| 489 | static bool |
| 490 | if_unlink_ifnet(struct ifnet *ifp, bool vmove) |
| 491 | { |
| 492 | struct ifnet *iter; |
| 493 | int found = 0; |
| 494 | |
| 495 | IFNET_WLOCK(); |
| 496 | CK_STAILQ_FOREACH(iter, &V_ifnet, if_link) |
| 497 | if (iter == ifp) { |
| 498 | CK_STAILQ_REMOVE(&V_ifnet, ifp, ifnet, if_link); |
| 499 | if (!vmove) |
| 500 | ifp->if_flags |= IFF_DYING; |
| 501 | found = 1; |
| 502 | break; |
| 503 | } |
| 504 | #ifdef VIMAGE |
| 505 | curvnet->vnet_ifcnt--; |
| 506 | #endif |
| 507 | IFNET_WUNLOCK(); |
| 508 | |
| 509 | return (found); |
| 510 | } |
| 511 | |
| 512 | #ifdef VIMAGE |
| 513 | static void |
no outgoing calls
no test coverage detected