* Update the report timer on a group in response to an IGMPv2 query. * * If we are becoming the reporting member for this group, start the timer. * If we already are the reporting member for this group, and timer is * below the threshold, reset it. * * We may be updating the group for the first time since we switched * to IGMPv3. If we are, then we must clear any recorded source lists, * a
| 944 | * to avoid bursts of IGMPv2 reports. |
| 945 | */ |
| 946 | static void |
| 947 | igmp_v2_update_group(struct in_multi *inm, const int timer) |
| 948 | { |
| 949 | |
| 950 | CTR4(KTR_IGMPV3, "0x%08x: %s/%s timer=%d", __func__, |
| 951 | ntohl(inm->inm_addr.s_addr), inm->inm_ifp->if_xname, timer); |
| 952 | |
| 953 | IN_MULTI_LIST_LOCK_ASSERT(); |
| 954 | |
| 955 | switch (inm->inm_state) { |
| 956 | case IGMP_NOT_MEMBER: |
| 957 | case IGMP_SILENT_MEMBER: |
| 958 | break; |
| 959 | case IGMP_REPORTING_MEMBER: |
| 960 | if (inm->inm_timer != 0 && |
| 961 | inm->inm_timer <= timer) { |
| 962 | CTR1(KTR_IGMPV3, "%s: REPORTING and timer running, " |
| 963 | "skipping.", __func__); |
| 964 | break; |
| 965 | } |
| 966 | /* FALLTHROUGH */ |
| 967 | case IGMP_SG_QUERY_PENDING_MEMBER: |
| 968 | case IGMP_G_QUERY_PENDING_MEMBER: |
| 969 | case IGMP_IDLE_MEMBER: |
| 970 | case IGMP_LAZY_MEMBER: |
| 971 | case IGMP_AWAKENING_MEMBER: |
| 972 | CTR1(KTR_IGMPV3, "%s: ->REPORTING", __func__); |
| 973 | inm->inm_state = IGMP_REPORTING_MEMBER; |
| 974 | inm->inm_timer = IGMP_RANDOM_DELAY(timer); |
| 975 | V_current_state_timers_running = 1; |
| 976 | break; |
| 977 | case IGMP_SLEEPING_MEMBER: |
| 978 | CTR1(KTR_IGMPV3, "%s: ->AWAKENING", __func__); |
| 979 | inm->inm_state = IGMP_AWAKENING_MEMBER; |
| 980 | break; |
| 981 | case IGMP_LEAVING_MEMBER: |
| 982 | break; |
| 983 | } |
| 984 | } |
| 985 | |
| 986 | /* |
| 987 | * Process a received IGMPv3 general, group-specific or |
no outgoing calls
no test coverage detected