mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 00:59:13 +00:00
pimd: Addressing the review comments
Signed-off-by: Sarita Patra <saritap@vmware.com>
This commit is contained in:
parent
246445a372
commit
47e3ce59c4
@ -190,10 +190,6 @@ struct channel_oil *pim_channel_oil_add(struct pim_instance *pim,
|
||||
c_oil->installed = 0;
|
||||
c_oil->up = pim_upstream_find(pim, sg);
|
||||
c_oil->pim = pim;
|
||||
if (input_vif_index != MAXVIFS)
|
||||
c_oil->is_valid = 1;
|
||||
else
|
||||
c_oil->is_valid = 0;
|
||||
|
||||
listnode_add_sort(pim->channel_oil_list, c_oil);
|
||||
|
||||
@ -453,10 +449,10 @@ int pim_channel_add_oif(struct channel_oil *channel_oil, struct interface *oif,
|
||||
channel_oil->oil.mfcc_ttls[pim_ifp->mroute_vif_index] =
|
||||
PIM_MROUTE_MIN_TTL;
|
||||
|
||||
/* channel_oil->is_valid indicate if this entry is valid to get
|
||||
* installed in kernel.
|
||||
/* channel_oil->oil.mfcc_parent != MAXVIFS indicate this entry is not
|
||||
* valid to get installed in kernel.
|
||||
*/
|
||||
if (channel_oil->is_valid) {
|
||||
if (channel_oil->oil.mfcc_parent != MAXVIFS) {
|
||||
if (pim_mroute_add(channel_oil, __PRETTY_FUNCTION__)) {
|
||||
if (PIM_DEBUG_MROUTE) {
|
||||
char group_str[INET_ADDRSTRLEN];
|
||||
|
@ -89,7 +89,6 @@ struct channel_oil {
|
||||
struct pim_instance *pim;
|
||||
|
||||
struct mfcctl oil;
|
||||
bool is_valid;
|
||||
int installed;
|
||||
int oil_inherited_rescan;
|
||||
int oil_size;
|
||||
|
@ -325,7 +325,6 @@ void pim_upstream_rpf_clear(struct pim_instance *pim,
|
||||
if (up->rpf.source_nexthop.interface) {
|
||||
if (up->channel_oil) {
|
||||
up->channel_oil->oil.mfcc_parent = MAXVIFS;
|
||||
up->channel_oil->is_valid = 0;
|
||||
pim_mroute_del(up->channel_oil, __PRETTY_FUNCTION__);
|
||||
|
||||
}
|
||||
|
@ -306,19 +306,13 @@ static int on_join_timer(struct thread *t)
|
||||
|
||||
static void join_timer_stop(struct pim_upstream *up)
|
||||
{
|
||||
struct pim_neighbor *nbr;
|
||||
|
||||
if (!up->rpf.source_nexthop.interface) {
|
||||
if (PIM_DEBUG_TRACE)
|
||||
zlog_debug("%s: up %s RPF is not present",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
return;
|
||||
}
|
||||
struct pim_neighbor *nbr = NULL;
|
||||
|
||||
THREAD_OFF(up->t_join_timer);
|
||||
|
||||
nbr = pim_neighbor_find(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4);
|
||||
if (up->rpf.source_nexthop.interface)
|
||||
nbr = pim_neighbor_find(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4);
|
||||
|
||||
if (nbr)
|
||||
pim_jp_agg_remove_group(nbr->upstream_jp_agg, up);
|
||||
@ -330,13 +324,6 @@ void join_timer_start(struct pim_upstream *up)
|
||||
{
|
||||
struct pim_neighbor *nbr = NULL;
|
||||
|
||||
if (!up->rpf.source_nexthop.interface) {
|
||||
if (PIM_DEBUG_TRACE)
|
||||
zlog_debug("%s: up %s RPF is not present",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
return;
|
||||
}
|
||||
|
||||
if (up->rpf.source_nexthop.interface) {
|
||||
nbr = pim_neighbor_find(up->rpf.source_nexthop.interface,
|
||||
up->rpf.rpf_addr.u.prefix4);
|
||||
@ -562,14 +549,16 @@ void pim_upstream_switch(struct pim_instance *pim, struct pim_upstream *up,
|
||||
enum pim_upstream_state old_state = up->join_state;
|
||||
|
||||
if (up->upstream_addr.s_addr == INADDR_ANY) {
|
||||
zlog_debug("%s: RPF not configured for %s",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
if (PIM_DEBUG_PIM_EVENTS)
|
||||
zlog_debug("%s: RPF not configured for %s",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!up->rpf.source_nexthop.interface) {
|
||||
zlog_debug("%s: RP not reachable for %s",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
if (PIM_DEBUG_PIM_EVENTS)
|
||||
zlog_debug("%s: RP not reachable for %s",
|
||||
__PRETTY_FUNCTION__, up->sg_str);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -949,7 +938,7 @@ void pim_upstream_update_join_desired(struct pim_instance *pim,
|
||||
PIM_UPSTREAM_FLAG_UNSET_DR_JOIN_DESIRED(up->flags);
|
||||
|
||||
/* switched from false to true */
|
||||
if (is_join_desired) {
|
||||
if (is_join_desired && (up->join_state == PIM_UPSTREAM_NOTJOINED)) {
|
||||
pim_upstream_switch(pim, up, PIM_UPSTREAM_JOINED);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user