pimd: send pim prune via correct interface when rpf upstream interface for a source changes
When the rpf upstream interface for a joined source changes, a prune was
being sent out the new rpf upstream interface that was intended for the old
upstream router. The prune should be sent out the old rpf upstream
interface so that the old route for the multicast source is pruned.
Reviewed-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Taylor Bouvin <tbouvin@atcorp.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 8f85b17..0a07c06 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -341,10 +341,10 @@
struct pim_upstream *up;
for (ALL_LIST_ELEMENTS(qpim_upstream_list, up_node, up_nextnode, up)) {
- struct in_addr old_rpf_addr;
+ struct pim_rpf old_rpf;
enum pim_rpf_result rpf_result;
- rpf_result = pim_rpf_update(up, &old_rpf_addr);
+ rpf_result = pim_rpf_update(up, &old_rpf);
if (rpf_result == PIM_RPF_FAILURE)
continue;
@@ -368,8 +368,8 @@
/* send Prune(S,G) to the old upstream neighbor */
- pim_joinprune_send(up->rpf.source_nexthop.interface,
- old_rpf_addr,
+ pim_joinprune_send(old_rpf.source_nexthop.interface,
+ old_rpf.rpf_addr,
up->source_addr,
up->group_addr,
0 /* prune */);