| 1626 | } |
| 1627 | |
| 1628 | static void |
| 1629 | inp_gcmoptions(struct ip_moptions *imo) |
| 1630 | { |
| 1631 | struct in_mfilter *imf; |
| 1632 | struct in_multi *inm; |
| 1633 | struct ifnet *ifp; |
| 1634 | |
| 1635 | while ((imf = ip_mfilter_first(&imo->imo_head)) != NULL) { |
| 1636 | ip_mfilter_remove(&imo->imo_head, imf); |
| 1637 | |
| 1638 | imf_leave(imf); |
| 1639 | if ((inm = imf->imf_inm) != NULL) { |
| 1640 | if ((ifp = inm->inm_ifp) != NULL) { |
| 1641 | CURVNET_SET(ifp->if_vnet); |
| 1642 | (void)in_leavegroup(inm, imf); |
| 1643 | CURVNET_RESTORE(); |
| 1644 | } else { |
| 1645 | (void)in_leavegroup(inm, imf); |
| 1646 | } |
| 1647 | } |
| 1648 | ip_mfilter_free(imf); |
| 1649 | } |
| 1650 | free(imo, M_IPMOPTS); |
| 1651 | } |
| 1652 | |
| 1653 | /* |
| 1654 | * Discard the IP multicast options (and source filters). To minimize |
no test coverage detected