From 9f44d04202ddfcc3df63c6d542720163fba21a76 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 11 Feb 2017 06:53:00 -0500 Subject: [PATCH] pimd: Narrow inheritance search down to interface we are interested in. When we are only looking at one ifchannel, for inheritance, narrow the search down to only the interface/ifchannel we are interested in Signed-off-by: Donald Sharp --- pimd/pim_ifchannel.c | 4 ++-- pimd/pim_ifchannel.h | 1 + pimd/pim_upstream.c | 2 +- pimd/pim_upstream.h | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pimd/pim_ifchannel.c b/pimd/pim_ifchannel.c index 0b5baf9756..6bff65c1ad 100644 --- a/pimd/pim_ifchannel.c +++ b/pimd/pim_ifchannel.c @@ -969,7 +969,7 @@ pim_ifchannel_local_membership_add(struct interface *ifp, __FILE__, __PRETTY_FUNCTION__, child->sg_str, ifp->name, up->sg_str); - if (pim_upstream_evaluate_join_desired (child)) + if (pim_upstream_evaluate_join_desired_interface (child, ch)) { pim_channel_add_oif (child->channel_oil, ifp, PIM_OIF_FLAG_PROTO_STAR); pim_upstream_switch (child, PIM_UPSTREAM_JOINED); @@ -1016,7 +1016,7 @@ void pim_ifchannel_local_membership_del(struct interface *ifp, __FILE__, __PRETTY_FUNCTION__, up->sg_str, ifp->name, child->sg_str); - if (c_oil && !pim_upstream_evaluate_join_desired (child)) + if (c_oil && !pim_upstream_evaluate_join_desired_interface (child, ch)) pim_channel_del_oif (c_oil, ifp, PIM_OIF_FLAG_PROTO_STAR); /* diff --git a/pimd/pim_ifchannel.h b/pimd/pim_ifchannel.h index a3dc0e9d83..5cac0318c6 100644 --- a/pimd/pim_ifchannel.h +++ b/pimd/pim_ifchannel.h @@ -26,6 +26,7 @@ #include "if.h" #include "prefix.h" +struct pim_ifchannel; #include "pim_upstream.h" enum pim_ifmembership { diff --git a/pimd/pim_upstream.c b/pimd/pim_upstream.c index 4f63b20da5..b7526c290a 100644 --- a/pimd/pim_upstream.c +++ b/pimd/pim_upstream.c @@ -661,7 +661,7 @@ struct pim_upstream *pim_upstream_add(struct prefix_sg *sg, return up; } -static int +int pim_upstream_evaluate_join_desired_interface (struct pim_upstream *up, struct pim_ifchannel *ch) { diff --git a/pimd/pim_upstream.h b/pimd/pim_upstream.h index 271f2dfbde..f36b6fba8b 100644 --- a/pimd/pim_upstream.h +++ b/pimd/pim_upstream.h @@ -129,6 +129,8 @@ struct pim_upstream *pim_upstream_add (struct prefix_sg *sg, void pim_upstream_del(struct pim_upstream *up, const char *name); int pim_upstream_evaluate_join_desired(struct pim_upstream *up); +int pim_upstream_evaluate_join_desired_interface(struct pim_upstream *up, + struct pim_ifchannel *ch); void pim_upstream_update_join_desired(struct pim_upstream *up); void pim_upstream_join_suppress(struct pim_upstream *up,