From ec97ac659388fb0fae4aceb77598d355502f21c8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 14 Mar 2017 07:58:17 -0400 Subject: [PATCH] pimd: Remember to delete reference to upstream in failure When creating the pim upstream data structure, if we fail to create remove the reference we saved to it on the side in the pnc code. Signed-off-by: Donald Sharp --- pimd/pim_upstream.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index b29e71a334..06f0c5c03c 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -621,10 +621,17 @@ pim_upstream_new (struct prefix_sg *sg, rpf_result = pim_rpf_update(up, NULL, 1); if (rpf_result == PIM_RPF_FAILURE) { + struct prefix nht_p; + if (PIM_DEBUG_TRACE) zlog_debug ("%s: Attempting to create upstream(%s), Unable to RPF for source", __PRETTY_FUNCTION__, up->sg_str); + nht_p.family = AF_INET; + nht_p.prefixlen = IPV4_MAX_BITLEN; + nht_p.u.prefix4 = up->upstream_addr; + pim_delete_tracked_nexthop (&nht_p, up, NULL); + if (up->parent) { listnode_delete (up->parent->sources, up); -- 2.39.5