diff options
Diffstat (limited to 'pimd/pim_mroute.c')
| -rw-r--r-- | pimd/pim_mroute.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index f366fdbe79..9060b6a95a 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -232,6 +232,8 @@ static int pim_mroute_msg_nocache(int fd, struct interface *ifp, pim_upstream_mroute_iif_update(up->channel_oil, __func__); } pim_register_join(up); + /* if we have receiver, inherit from parent */ + pim_upstream_inherited_olist_decide(pim_ifp->pim, up); return 0; } @@ -484,7 +486,10 @@ static int pim_mroute_msg_wrvifwhole(int fd, struct interface *ifp, struct pim_upstream *parent; struct pim_nexthop source; struct pim_rpf *rpf = RP(pim_ifp->pim, sg.grp); - if (!rpf || !rpf->source_nexthop.interface) + + /* No RPF or No RPF interface or No mcast on RPF interface */ + if (!rpf || !rpf->source_nexthop.interface + || !rpf->source_nexthop.interface->info) return 0; /* @@ -961,7 +966,7 @@ static inline void pim_mroute_copy(struct mfcctl *oil, static int pim_mroute_add(struct channel_oil *c_oil, const char *name) { struct pim_instance *pim = c_oil->pim; - struct mfcctl tmp_oil; + struct mfcctl tmp_oil = { {0} }; int err; pim->mroute_add_last = pim_time_monotonic_sec(); @@ -1017,8 +1022,10 @@ static int pim_mroute_add(struct channel_oil *c_oil, const char *name) pim_channel_oil_dump(c_oil, buf, sizeof(buf))); } - c_oil->installed = 1; - c_oil->mroute_creation = pim_time_monotonic_sec(); + if (!c_oil->installed) { + c_oil->installed = 1; + c_oil->mroute_creation = pim_time_monotonic_sec(); + } return 0; } |
