| 723 | } |
| 724 | |
| 725 | static void |
| 726 | igi_delete_locked(const struct ifnet *ifp) |
| 727 | { |
| 728 | struct igmp_ifsoftc *igi, *tigi; |
| 729 | |
| 730 | CTR3(KTR_IGMPV3, "%s: freeing igmp_ifsoftc for ifp %p(%s)", |
| 731 | __func__, ifp, ifp->if_xname); |
| 732 | |
| 733 | IGMP_LOCK_ASSERT(); |
| 734 | |
| 735 | LIST_FOREACH_SAFE(igi, &V_igi_head, igi_link, tigi) { |
| 736 | if (igi->igi_ifp == ifp) { |
| 737 | /* |
| 738 | * Free deferred General Query responses. |
| 739 | */ |
| 740 | mbufq_drain(&igi->igi_gq); |
| 741 | |
| 742 | LIST_REMOVE(igi, igi_link); |
| 743 | free(igi, M_IGMP); |
| 744 | return; |
| 745 | } |
| 746 | } |
| 747 | } |
| 748 | |
| 749 | /* |
| 750 | * Process a received IGMPv1 query. |
no test coverage detected