A empty inherited_olist implies that we have
no outgoing interfaces.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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));
+}
struct interface *oif,
uint32_t proto_mask);
+int pim_channel_oil_empty (struct channel_oil *c_oil);
#endif /* PIM_OIL_H */
int
pim_upstream_empty_inherited_olist (struct pim_upstream *up)
{
- // FIXME: Currently this is not implemented
- return 0;
+ return pim_channel_oil_empty (up->channel_oil);
}
/*