summaryrefslogtreecommitdiff
path: root/pimd/pim_mroute.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-08-22 09:10:05 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:07 -0500
commit4df01a4e66fec6472d9d0b89d199654eb5c6e8bd (patch)
treee4ab1aed1542bbbf4c480de85c3ada97b82e24f0 /pimd/pim_mroute.c
parent7747bad6ac449903b4ff95bb495c08010084f862 (diff)
pimd: Fix pim to use correct src address for packets
When sending register packets to the RP from the FHR we should be using the ip address of the incoming interface that received the mcast packet. Ticket: CM-12445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_mroute.c')
-rw-r--r--pimd/pim_mroute.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pimd/pim_mroute.c b/pimd/pim_mroute.c
index a17a8b1006..65696f6d33 100644
--- a/pimd/pim_mroute.c
+++ b/pimd/pim_mroute.c
@@ -218,7 +218,8 @@ 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), rpg, 0);
+ pim_register_send((uint8_t *)buf + sizeof(struct ip), ntohs (ip_hdr->ip_len),
+ pim_ifp->primary_address, rpg, 0);
return 0;
}
@@ -357,9 +358,12 @@ pim_mroute_msg_wrvifwhole (int fd, struct interface *ifp, const char *buf)
if (!up->fhr)
{
struct pim_nexthop source;
+ struct pim_rpf *rpf = RP (sg.grp);
+ pim_ifp = rpf->source_nexthop.interface->info;
+
//No if channel, but upstream we are at the RP.
pim_nexthop_lookup (&source, up->upstream_register);
- pim_register_stop_send(source.interface, &sg, up->upstream_register);
+ pim_register_stop_send(source.interface, &sg, pim_ifp->primary_address, up->upstream_register);
//Send S bit down the join.
up->sptbit = PIM_UPSTREAM_SPTBIT_TRUE;
}