diff options
Diffstat (limited to 'pimd/pim_mroute.c')
| -rw-r--r-- | pimd/pim_mroute.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c index dd9e21cae8..999a1eb580 100644 --- a/pimd/pim_mroute.c +++ b/pimd/pim_mroute.c @@ -234,7 +234,8 @@ static int pim_mroute_msg_nocache(int fd, struct interface *ifp, up->channel_oil->cc.pktcnt++; PIM_UPSTREAM_FLAG_SET_FHR(up->flags); // resolve mfcc_parent prior to mroute_add in channel_add_oif - if (up->channel_oil->oil.mfcc_parent >= MAXVIFS) { + if (up->rpf.source_nexthop.interface && + up->channel_oil->oil.mfcc_parent >= MAXVIFS) { int vif_index = 0; vif_index = pim_if_find_vifindex_by_ifindex( pim_ifp->pim, @@ -301,6 +302,13 @@ static int pim_mroute_msg_wholepkt(int fd, struct interface *ifp, return 0; } + 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 0; + } + pim_ifp = up->rpf.source_nexthop.interface->info; rpg = pim_ifp ? RP(pim_ifp->pim, sg.grp) : NULL; @@ -956,6 +964,8 @@ int pim_mroute_add(struct channel_oil *c_oil, const char *name) } c_oil->installed = 1; + c_oil->mroute_creation = pim_time_monotonic_sec(); + return 0; } @@ -1022,7 +1032,7 @@ void pim_mroute_update_counters(struct channel_oil *c_oil) sg.grp = c_oil->oil.mfcc_mcastgrp; if (PIM_DEBUG_MROUTE) zlog_debug( - "Channel(%s) is not installed no need to collect data from kernel", + "Channel%s is not installed no need to collect data from kernel", pim_str_sg_dump(&sg)); } return; @@ -1041,7 +1051,7 @@ void pim_mroute_update_counters(struct channel_oil *c_oil) sg.grp = c_oil->oil.mfcc_mcastgrp; zlog_warn( - "ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=(%s): errno=%d: %s", + "ioctl(SIOCGETSGCNT=%lu) failure for (S,G)=%s: errno=%d: %s", (unsigned long)SIOCGETSGCNT, pim_str_sg_dump(&sg), errno, safe_strerror(errno)); |
