]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Add some small infrastructure to get the mlag code in zebra started
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 18 Dec 2018 12:44:23 +0000 (07:44 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 4 Jan 2019 17:21:00 +0000 (12:21 -0500)
Add a zebra_mlag.h and a zebra_mlag.c startup/shutdown code to zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/subdir.am
zebra/zebra_mlag.c [new file with mode: 0644]
zebra/zebra_mlag.h [new file with mode: 0644]
zebra/zebra_router.c

index b8f5e0d4098ff34f2ce8f8940072782b3781e05e..977990c3810e8d95af74a59e584cd10a4a714135 100644 (file)
@@ -64,6 +64,7 @@ zebra_zebra_SOURCES = \
        zebra/rtread_sysctl.c \
        zebra/rule_netlink.c \
        zebra/rule_socket.c \
+       zebra/zebra_mlag.c \
        zebra/zebra_l2.c \
        zebra/zebra_memory.c \
        zebra/zebra_dplane.c \
@@ -119,6 +120,7 @@ noinst_HEADERS += \
        zebra/rt_netlink.h \
        zebra/rtadv.h \
        zebra/rule_netlink.h \
+       zebra/zebra_mlag.h \
        zebra/zebra_fpm_private.h \
        zebra/zebra_l2.h \
        zebra/zebra_dplane.h \
diff --git a/zebra/zebra_mlag.c b/zebra/zebra_mlag.c
new file mode 100644 (file)
index 0000000..d1fc71a
--- /dev/null
@@ -0,0 +1,34 @@
+/* Zebra Mlag Code.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *                    Donald Sharp
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+#include "zebra.h"
+
+#include "hook.h"
+
+#include "zebra/zebra_mlag.h"
+
+void zebra_mlag_init(void)
+{
+}
+
+void zebra_mlag_terminate(void)
+{
+}
diff --git a/zebra/zebra_mlag.h b/zebra/zebra_mlag.h
new file mode 100644 (file)
index 0000000..97065bb
--- /dev/null
@@ -0,0 +1,29 @@
+/* Zebra mlag header.
+ * Copyright (C) 2018 Cumulus Networks, Inc.
+ *                    Donald Sharp
+ *
+ * This file is part of FRR.
+ *
+ * FRR is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * FRR is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FRR; see the file COPYING.  If not, write to the Free
+ * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+#ifndef __ZEBRA_MLAG_H__
+#define __ZEBRA_MLAG_H__
+
+#include "mlag.h"
+
+void zebra_mlag_init(void);
+void zebra_mlag_terminate(void);
+#endif
index 2e1c69fb9269af3cc29252e2b9577bd6a0b1c2e7..ae18a0d290423a7e720ae344fc016fab1cb2e1b5 100644 (file)
@@ -25,6 +25,7 @@
 #include "zebra_memory.h"
 #include "zebra_pbr.h"
 #include "zebra_vxlan.h"
+#include "zebra_mlag.h"
 
 struct zebra_router zrouter;
 
@@ -159,6 +160,8 @@ void zebra_router_terminate(void)
        }
 
        zebra_vxlan_disable();
+       zebra_mlag_terminate();
+
        hash_clean(zrouter.rules_hash, zebra_pbr_rules_free);
        hash_free(zrouter.rules_hash);
 
@@ -173,6 +176,8 @@ void zebra_router_terminate(void)
 void zebra_router_init(void)
 {
        zebra_vxlan_init();
+       zebra_mlag_init();
+
        zrouter.rules_hash = hash_create_size(8, zebra_pbr_rules_hash_key,
                                              zebra_pbr_rules_hash_equal,
                                              "Rules Hash");