mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 16:20:32 +00:00
pimd: Write pim_upstream_empty_inherited_olist
A empty inherited_olist implies that we have no outgoing interfaces. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
b72f79a92b
commit
ce0ddb4e79
@ -432,3 +432,24 @@ int pim_channel_add_oif(struct channel_oil *channel_oil,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pim_channel_oil_empty (struct channel_oil *c_oil)
|
||||||
|
{
|
||||||
|
static uint32_t zero[MAXVIFS];
|
||||||
|
static int inited = 0;
|
||||||
|
|
||||||
|
if (!c_oil)
|
||||||
|
return 1;
|
||||||
|
/*
|
||||||
|
* Not sure that this is necessary, but I would rather ensure
|
||||||
|
* that this works.
|
||||||
|
*/
|
||||||
|
if (!inited)
|
||||||
|
{
|
||||||
|
memset(&zero, 0, sizeof(uint32_t) * MAXVIFS);
|
||||||
|
inited = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return !memcmp(c_oil->oif_flags, zero, MAXVIFS * sizeof(uint32_t));
|
||||||
|
}
|
||||||
|
@ -95,4 +95,5 @@ int pim_channel_del_oif (struct channel_oil *c_oil,
|
|||||||
struct interface *oif,
|
struct interface *oif,
|
||||||
uint32_t proto_mask);
|
uint32_t proto_mask);
|
||||||
|
|
||||||
|
int pim_channel_oil_empty (struct channel_oil *c_oil);
|
||||||
#endif /* PIM_OIL_H */
|
#endif /* PIM_OIL_H */
|
||||||
|
@ -1242,8 +1242,7 @@ pim_upstream_inherited_olist (struct pim_upstream *up)
|
|||||||
int
|
int
|
||||||
pim_upstream_empty_inherited_olist (struct pim_upstream *up)
|
pim_upstream_empty_inherited_olist (struct pim_upstream *up)
|
||||||
{
|
{
|
||||||
// FIXME: Currently this is not implemented
|
return pim_channel_oil_empty (up->channel_oil);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user