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

Function mld_v2_process_group_timers

freebsd/netinet6/mld6.c:1514–1629  ·  view source on GitHub ↗

* Update a group's timers for MLDv2. * Will update the global pending timer flags. * Note: Unlocked read from mli. */

Source from the content-addressed store, hash-verified

1512 * Note: Unlocked read from mli.
1513 */
1514static void
1515mld_v2_process_group_timers(struct in6_multi_head *inmh,
1516 struct mbufq *qrq, struct mbufq *scq,
1517 struct in6_multi *inm, const int uri_fasthz)
1518{
1519 int query_response_timer_expired;
1520 int state_change_retransmit_timer_expired;
1521#ifdef KTR
1522 char ip6tbuf[INET6_ADDRSTRLEN];
1523#endif
1524
1525 IN6_MULTI_LIST_LOCK_ASSERT();
1526 MLD_LOCK_ASSERT();
1527
1528 query_response_timer_expired = 0;
1529 state_change_retransmit_timer_expired = 0;
1530
1531 /*
1532 * During a transition from compatibility mode back to MLDv2,
1533 * a group record in REPORTING state may still have its group
1534 * timer active. This is a no-op in this function; it is easier
1535 * to deal with it here than to complicate the slow-timeout path.
1536 */
1537 if (inm->in6m_timer == 0) {
1538 query_response_timer_expired = 0;
1539 } else if (--inm->in6m_timer == 0) {
1540 query_response_timer_expired = 1;
1541 } else {
1542 V_current_state_timers_running6 = 1;
1543 }
1544
1545 if (inm->in6m_sctimer == 0) {
1546 state_change_retransmit_timer_expired = 0;
1547 } else if (--inm->in6m_sctimer == 0) {
1548 state_change_retransmit_timer_expired = 1;
1549 } else {
1550 V_state_change_timers_running6 = 1;
1551 }
1552
1553 /* We are in fasttimo, so be quick about it. */
1554 if (!state_change_retransmit_timer_expired &&
1555 !query_response_timer_expired)
1556 return;
1557
1558 switch (inm->in6m_state) {
1559 case MLD_NOT_MEMBER:
1560 case MLD_SILENT_MEMBER:
1561 case MLD_SLEEPING_MEMBER:
1562 case MLD_LAZY_MEMBER:
1563 case MLD_AWAKENING_MEMBER:
1564 case MLD_IDLE_MEMBER:
1565 break;
1566 case MLD_G_QUERY_PENDING_MEMBER:
1567 case MLD_SG_QUERY_PENDING_MEMBER:
1568 /*
1569 * Respond to a previously pending Group-Specific
1570 * or Group-and-Source-Specific query by enqueueing
1571 * the appropriate Current-State report for

Callers 1

mld_fasttimo_vnetFunction · 0.85

Calls 7

in6m_clear_recordedFunction · 0.85
in6m_commitFunction · 0.85
ip6_sprintfFunction · 0.85
in6m_disconnect_lockedFunction · 0.85
in6m_rele_lockedFunction · 0.70

Tested by

no test coverage detected