Skip to content

Commit

Permalink
Create MRT entry once PIM Register is received even if no joins
Browse files Browse the repository at this point in the history
exists. This makes it possible to send join towards S right after
join is received from multicast listener without waiting for next
PIM Register. Saves 0 - 60 seconds in such scenario.
  • Loading branch information
idismmxiv committed Feb 2, 2016
1 parent fe11f05 commit c843c1e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pim_proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,25 @@ int receive_pim_register(uint32_t reg_src, uint32_t reg_dst, char *msg, size_t l
/* TODO: XXX: shouldn't it be inner_src=INADDR_ANY? Not in the spec. */
send_pim_register_stop(reg_dst, reg_src, inner_grp, inner_src);

/* Create mrtentry for forthcoming join requests. Once one occurs
* we know who is sending to this group and can send join to
* that immediately. Saves 0 - 60 seconds not to wait next
* PIM Register.
*/
mrtentry = find_route(inner_src, inner_grp, MRTF_SG, CREATE);
if (!mrtentry)
return TRUE;

mrtentry->incoming = reg_vif_num;
SET_TIMER(mrtentry->timer, PIM_DATA_TIMEOUT);
mrtentry->flags &= ~MRTF_NEW;
change_interfaces(mrtentry,
mrtentry->incoming,
mrtentry->joined_oifs,
mrtentry->pruned_oifs,
mrtentry->leaves,
mrtentry->asserted_oifs, 0);

return TRUE;
}

Expand Down

0 comments on commit c843c1e

Please sign in to comment.