summaryrefslogtreecommitdiff
path: root/pimd/pim_mroute.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-04-01 07:58:05 -0400
committerGitHub <noreply@github.com>2017-04-01 07:58:05 -0400
commit2aaa554de9535e9299519d82b11f55f12c808975 (patch)
tree504a77d6bbb076ac8ba7a564e8b15c597bd5afad /pimd/pim_mroute.c
parent2e725ad140e14ed03195028881be65c2cefc079a (diff)
parent2b5c7fa46d98ea35f6febd5b3da32ca0a2445ca2 (diff)
Merge branch 'master' into pim_5549
Diffstat (limited to 'pimd/pim_mroute.c')
-rw-r--r--pimd/pim_mroute.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index 04b6a4c697..90e30ea3d6 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -39,6 +39,7 @@
#include "pim_register.h"
#include "pim_ifchannel.h"
#include "pim_zlookup.h"
+#include "pim_ssm.h"
/* GLOBAL VARS */
static struct thread *qpim_mroute_socket_reader = NULL;
@@ -127,8 +128,7 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
*/
if ((pim_rpf_addr_is_inaddr_none (rpg)) ||
(!pim_ifp) ||
- (!(PIM_I_am_DR(pim_ifp))) ||
- (pim_ifp->itype == PIM_INTERFACE_SSM))
+ (!(PIM_I_am_DR(pim_ifp))))
{
if (PIM_DEBUG_MROUTE_DETAIL)
zlog_debug ("%s: Interface is not configured correctly to handle incoming packet: Could be !DR, !pim_ifp, !SM, !RP",
@@ -178,8 +178,7 @@ pim_mroute_msg_nocache (int fd, struct interface *ifp, const struct igmpmsg *msg
up->channel_oil->cc.pktcnt++;
PIM_UPSTREAM_FLAG_SET_FHR(up->flags);
- pim_channel_add_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_PIM);
- up->reg_state = PIM_REG_JOIN;
+ pim_register_join (up);
return 0;
}
@@ -214,8 +213,7 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf)
if ((pim_rpf_addr_is_inaddr_none (rpg)) ||
(!pim_ifp) ||
- (!(PIM_I_am_DR(pim_ifp))) ||
- (pim_ifp->itype == PIM_INTERFACE_SSM)) {
+ (!(PIM_I_am_DR(pim_ifp)))) {
if (PIM_DEBUG_MROUTE) {
zlog_debug("%s: Failed Check send packet", __PRETTY_FUNCTION__);
}
@@ -226,9 +224,18 @@ pim_mroute_msg_wholepkt (int fd, struct interface *ifp, const char *buf)
* If we've received a register suppress
*/
if (!up->t_rs_timer)
- pim_register_send((uint8_t *)buf + sizeof(struct ip),
- ntohs (ip_hdr->ip_len) - sizeof (struct ip),
- pim_ifp->primary_address, rpg, 0, up);
+ {
+ if (pim_is_grp_ssm (sg.grp))
+ {
+ if (PIM_DEBUG_PIM_REG)
+ zlog_debug ("%s register forward skipped as group is SSM",
+ pim_str_sg_dump (&sg));
+ return 0;
+ }
+ pim_register_send((uint8_t *)buf + sizeof(struct ip),
+ ntohs (ip_hdr->ip_len) - sizeof (struct ip),
+ pim_ifp->primary_address, rpg, 0, up);
+ }
return 0;
}
@@ -442,8 +449,7 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf)
pim_upstream_keep_alive_timer_start (up, qpim_keep_alive_time);
up->channel_oil = oil;
up->channel_oil->cc.pktcnt++;
- pim_channel_add_oif (up->channel_oil, pim_regiface, PIM_OIF_FLAG_PROTO_PIM);
- up->reg_state = PIM_REG_JOIN;
+ pim_register_join (up);
pim_upstream_inherited_olist (up);
// Send the packet to the RP