* Prune a source entry from an existing socket-layer filter set, * maintaining any required invariants and checking allocations. * * The source is marked as being left at t1, it is not freed. * * Return 0 if no error occurred, otherwise return an errno value. */
| 822 | * Return 0 if no error occurred, otherwise return an errno value. |
| 823 | */ |
| 824 | static int |
| 825 | imf_prune(struct in_mfilter *imf, const struct sockaddr_in *psin) |
| 826 | { |
| 827 | struct ip_msource find; |
| 828 | struct ip_msource *ims; |
| 829 | struct in_msource *lims; |
| 830 | |
| 831 | /* key is host byte order */ |
| 832 | find.ims_haddr = ntohl(psin->sin_addr.s_addr); |
| 833 | ims = RB_FIND(ip_msource_tree, &imf->imf_sources, &find); |
| 834 | if (ims == NULL) |
| 835 | return (ENOENT); |
| 836 | lims = (struct in_msource *)ims; |
| 837 | lims->imsl_st[1] = MCAST_UNDEFINED; |
| 838 | return (0); |
| 839 | } |
| 840 | |
| 841 | /* |
| 842 | * Revert socket-layer filter set deltas at t1 to t0 state. |
no outgoing calls
no test coverage detected