+// SPDX-License-Identifier: GPL-2.0-or-later
/* zebra daemon main routine.
* Copyright (C) 1997, 98 Kunihiro Ishiguro
- *
- * 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 "sigevent.h"
#include "vrf.h"
#include "libfrr.h"
+#include "affinitymap.h"
#include "routemap.h"
#include "routing_nb.h"
/* Route retain mode flag. */
int retain_mode = 0;
-/* Allow non-frr entities to delete frr routes */
-int allow_delete = 0;
-
int graceful_restart;
bool v6_rr_semantics = false;
#endif /* HAVE_NETLINK */
{0}};
-zebra_capabilities_t _caps_p[] = {
- ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN, ZCAP_NET_RAW,
+zebra_capabilities_t _caps_p[] = {ZCAP_NET_ADMIN, ZCAP_SYS_ADMIN,
+ ZCAP_NET_RAW,
+#ifdef HAVE_DPDK
+ ZCAP_IPC_LOCK, ZCAP_READ_SEARCH,
+ ZCAP_SYS_RAWIO
+#endif
};
/* zebra privileges to run with */
{
zlog_info("Zebra final shutdown");
- /* Final shutdown of ns resources */
- ns_walk_func(zebra_ns_final_shutdown, NULL, NULL);
-
/* Stop dplane thread and finish any cleanup */
zebra_dplane_shutdown();
+ /* Final shutdown of ns resources */
+ ns_walk_func(zebra_ns_final_shutdown, NULL, NULL);
+
zebra_router_terminate();
+ ns_terminate();
frr_fini();
exit(0);
}
},
};
+/* clang-format off */
static const struct frr_yang_module_info *const zebra_yang_modules[] = {
&frr_filter_info,
&frr_interface_info,
&frr_zebra_info,
&frr_vrf_info,
&frr_routing_info,
+ &frr_affinity_map_info,
&frr_zebra_route_map_info,
};
+/* clang-format on */
FRR_DAEMON_INFO(
zebra, ZEBRA, .vty_port = ZEBRA_VTY_PORT, .flags = FRR_NO_ZCLIENT,
// batch_mode = 1;
break;
case 'a':
- allow_delete = 1;
+ zrouter.allow_delete = true;
break;
case 'e': {
unsigned long int parsed_multipath =