MCPcopy Create free account
hub / github.com/F-Stack/f-stack / inp_gcmoptions

Function inp_gcmoptions

freebsd/netinet/in_mcast.c:1628–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1626}
1627
1628static void
1629inp_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

Callers 1

inp_freemoptionsFunction · 0.70

Calls 6

imf_leaveFunction · 0.85
in_leavegroupFunction · 0.85
ip_mfilter_freeFunction · 0.85
ip_mfilter_firstFunction · 0.70
ip_mfilter_removeFunction · 0.70
freeFunction · 0.50

Tested by

no test coverage detected