mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 06:03:10 +00:00
Merge pull request #14006 from AbhishekNR/mld_core
pim6d: Fixing core while running MLD conformance test.
This commit is contained in:
commit
46b47720a2
@ -1243,6 +1243,7 @@ static void gm_handle_q_groupsrc(struct gm_if *gm_ifp,
|
|||||||
|
|
||||||
for (i = 0; i < n_src; i++) {
|
for (i = 0; i < n_src; i++) {
|
||||||
sg = gm_sg_find(gm_ifp, grp, srcs[i]);
|
sg = gm_sg_find(gm_ifp, grp, srcs[i]);
|
||||||
|
GM_UPDATE_SG_STATE(sg);
|
||||||
gm_sg_timer_start(gm_ifp, sg, timers->expire_wait);
|
gm_sg_timer_start(gm_ifp, sg, timers->expire_wait);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1317,6 +1318,7 @@ static void gm_handle_q_group(struct gm_if *gm_ifp,
|
|||||||
if (PIM_DEBUG_GM_TRACE)
|
if (PIM_DEBUG_GM_TRACE)
|
||||||
zlog_debug(log_ifp("*,%pPAs expiry timer starting"),
|
zlog_debug(log_ifp("*,%pPAs expiry timer starting"),
|
||||||
&grp);
|
&grp);
|
||||||
|
GM_UPDATE_SG_STATE(sg);
|
||||||
gm_sg_timer_start(gm_ifp, sg, timers->expire_wait);
|
gm_sg_timer_start(gm_ifp, sg, timers->expire_wait);
|
||||||
|
|
||||||
sg = gm_sgs_next(gm_ifp->sgs, sg);
|
sg = gm_sgs_next(gm_ifp->sgs, sg);
|
||||||
|
@ -36,6 +36,21 @@ enum gm_sg_state {
|
|||||||
GM_SG_NOPRUNE_EXPIRING,
|
GM_SG_NOPRUNE_EXPIRING,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* If the timer gm_t_sg_expire is started without a leave message being received,
|
||||||
|
* the sg->state should be moved to expiring states.
|
||||||
|
* When the timer expires, we do not expect the state to be in join state.
|
||||||
|
* If a JOIN message is received while the timer is running,
|
||||||
|
* the state will be moved to JOIN and this timer will be switched off.
|
||||||
|
* Hence the below state transition is done.
|
||||||
|
*/
|
||||||
|
#define GM_UPDATE_SG_STATE(sg) \
|
||||||
|
do { \
|
||||||
|
if (sg->state == GM_SG_JOIN) \
|
||||||
|
sg->state = GM_SG_JOIN_EXPIRING; \
|
||||||
|
else if (sg->state == GM_SG_NOPRUNE) \
|
||||||
|
sg->state = GM_SG_NOPRUNE_EXPIRING; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
static inline bool gm_sg_state_want_join(enum gm_sg_state state)
|
static inline bool gm_sg_state_want_join(enum gm_sg_state state)
|
||||||
{
|
{
|
||||||
return state != GM_SG_NOINFO && state != GM_SG_PRUNE;
|
return state != GM_SG_NOINFO && state != GM_SG_PRUNE;
|
||||||
|
Loading…
Reference in New Issue
Block a user