summaryrefslogtreecommitdiff
path: root/pimd/pim_upstream.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-14 07:58:17 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-16 18:58:39 -0400
commitec97ac659388fb0fae4aceb77598d355502f21c8 (patch)
treea837a530df06610683dd50348be6b98f917ef72d /pimd/pim_upstream.c
parente711cd3cece039d91a59834e6a9396f878b99c56 (diff)
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 <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_upstream.c')
-rw-r--r--pimd/pim_upstream.c7
1 files changed, 7 insertions, 0 deletions
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);