summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-02-15 09:06:58 -0500
committerStephen Worley <sworley@cumulusnetworks.com>2019-05-29 15:25:33 -0400
commit526052fb6df25b303a0f9792ac6731d88f0a0851 (patch)
tree63d39f0c334544e8e5edfb84561d67560210a930 /zebra/zebra_router.c
parentca6af440b9c83c4007f980e06bfde03be7527865 (diff)
zebra: Move multicast mode to being a property of the router
The multicast mode enum was a global static in zebra_rib.c it does not belong there, it belongs in zebra_router, moving. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_router.c')
-rw-r--r--zebra/zebra_router.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c
index 610d51d3ea..4352d688a1 100644
--- a/zebra/zebra_router.c
+++ b/zebra/zebra_router.c
@@ -29,9 +29,12 @@
#include "zebra_pbr.h"
#include "zebra_vxlan.h"
#include "zebra_mlag.h"
+#include "zebra_nhg.h"
+#include "debug.h"
struct zebra_router zrouter = {
.multipath_num = MULTIPATH_NUM,
+ .ipv4_multicast_mode = MCAST_NO_CONFIG,
};
static inline int
@@ -187,6 +190,19 @@ uint32_t zebra_router_get_next_sequence(void)
memory_order_relaxed);
}
+void multicast_mode_ipv4_set(enum multicast_mode mode)
+{
+ if (IS_ZEBRA_DEBUG_RIB)
+ zlog_debug("%s: multicast lookup mode set (%d)", __func__,
+ mode);
+ zrouter.ipv4_multicast_mode = mode;
+}
+
+enum multicast_mode multicast_mode_ipv4_get(void)
+{
+ return zrouter.ipv4_multicast_mode;
+}
+
void zebra_router_terminate(void)
{
struct zebra_router_table *zrt, *tmp;