]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripd/rip_main.c
Merge pull request #13548 from opensourcerouting/fix/use_min_value_of_cli_zebra_cap_ecmp
[mirror_frr.git] / ripd / rip_main.c
index 7b9146b13acb84afb552db5530281f4d3e38f906..ac358ebbaf58b70adafa504b97c8620480a71a29 100644 (file)
@@ -1,28 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* RIPd main routine.
  * Copyright (C) 1997, 98 Kunihiro Ishiguro <kunihiro@zebra.org>
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra 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.
- *
- * GNU Zebra 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 this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
 
 #include <lib/version.h>
 #include "getopt.h"
-#include "thread.h"
+#include "frrevent.h"
 #include "command.h"
 #include "memory.h"
 #include "prefix.h"
 #include "if_rmap.h"
 #include "libfrr.h"
 #include "routemap.h"
+#include "bfd.h"
 
 #include "ripd/ripd.h"
+#include "ripd/rip_bfd.h"
 #include "ripd/rip_nb.h"
 #include "ripd/rip_errors.h"
 
@@ -47,6 +34,8 @@ static struct option longopts[] = {{0}};
 /* ripd privileges */
 zebra_capabilities_t _caps_p[] = {ZCAP_NET_RAW, ZCAP_BIND, ZCAP_SYS_ADMIN};
 
+uint32_t zebra_ecmp_count = MULTIPATH_NUM;
+
 struct zebra_privs_t ripd_privs = {
 #if defined(FRR_USER)
        .user = FRR_USER,
@@ -62,7 +51,7 @@ struct zebra_privs_t ripd_privs = {
        .cap_num_i = 0};
 
 /* Master of threads. */
-struct thread_master *master;
+struct event_loop *master;
 
 static struct frr_daemon_info ripd_di;
 
@@ -80,6 +69,7 @@ static void sigint(void)
 {
        zlog_notice("Terminating on signal");
 
+       bfd_protocol_integration_set_shutdown(true);
        rip_vrf_terminate();
        if_rmap_terminate();
        rip_zclient_stop();
@@ -94,7 +84,7 @@ static void sigusr1(void)
        zlog_rotate();
 }
 
-static struct quagga_signal_t ripd_signals[] = {
+static struct frr_signal_t ripd_signals[] = {
        {
                .signal = SIGHUP,
                .handler = &sighup,
@@ -177,6 +167,7 @@ int main(int argc, char **argv)
        rip_if_init();
        rip_cli_init();
        rip_zclient_init(master);
+       rip_bfd_init(master);
 
        frr_config_fork();
        frr_run(master);