* Merge socket-layer source into MLD-layer source. * If rollback is non-zero, perform the inverse of the merge. */
| 953 | * If rollback is non-zero, perform the inverse of the merge. |
| 954 | */ |
| 955 | static void |
| 956 | im6s_merge(struct ip6_msource *ims, const struct in6_msource *lims, |
| 957 | const int rollback) |
| 958 | { |
| 959 | int n = rollback ? -1 : 1; |
| 960 | #ifdef KTR |
| 961 | char ip6tbuf[INET6_ADDRSTRLEN]; |
| 962 | |
| 963 | ip6_sprintf(ip6tbuf, &lims->im6s_addr); |
| 964 | #endif |
| 965 | |
| 966 | if (lims->im6sl_st[0] == MCAST_EXCLUDE) { |
| 967 | CTR3(KTR_MLD, "%s: t1 ex -= %d on %s", __func__, n, ip6tbuf); |
| 968 | ims->im6s_st[1].ex -= n; |
| 969 | } else if (lims->im6sl_st[0] == MCAST_INCLUDE) { |
| 970 | CTR3(KTR_MLD, "%s: t1 in -= %d on %s", __func__, n, ip6tbuf); |
| 971 | ims->im6s_st[1].in -= n; |
| 972 | } |
| 973 | |
| 974 | if (lims->im6sl_st[1] == MCAST_EXCLUDE) { |
| 975 | CTR3(KTR_MLD, "%s: t1 ex += %d on %s", __func__, n, ip6tbuf); |
| 976 | ims->im6s_st[1].ex += n; |
| 977 | } else if (lims->im6sl_st[1] == MCAST_INCLUDE) { |
| 978 | CTR3(KTR_MLD, "%s: t1 in += %d on %s", __func__, n, ip6tbuf); |
| 979 | ims->im6s_st[1].in += n; |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | /* |
| 984 | * Atomically update the global in6_multi state, when a membership's |
no test coverage detected