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 <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-02-11 06:53:00 -05:00
parent 0ae2a75af4
commit 9f44d04202
4 changed files with 6 additions and 3 deletions

View File

@ -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);
/*

View File

@ -26,6 +26,7 @@
#include "if.h"
#include "prefix.h"
struct pim_ifchannel;
#include "pim_upstream.h"
enum pim_ifmembership {

View File

@ -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)
{

View File

@ -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,