/* 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;
// batch_mode = 1;
break;
case 'a':
- allow_delete = 1;
+ zrouter.allow_delete = true;
break;
case 'e': {
unsigned long int parsed_multipath =
DEFINE_HOOK(rib_update, (struct route_node * rn, const char *reason),
(rn, reason));
-/* Should we allow non FRR processes to delete our routes */
-extern int allow_delete;
-
/* Each route type's string and default distance value. */
static const struct {
int key;
rn, fib,
zebra_route_string(fib->type));
}
- if (allow_delete
- || CHECK_FLAG(dest->flags, RIB_ROUTE_ANY_QUEUED)) {
+ if (zrouter.allow_delete ||
+ CHECK_FLAG(dest->flags, RIB_ROUTE_ANY_QUEUED)) {
UNSET_FLAG(fib->status, ROUTE_ENTRY_INSTALLED);
/* Unset flags. */
for (rtnh = fib->nhe->nhg.nexthop; rtnh;
if (same) {
struct nexthop *tmp_nh;
- if (fromkernel && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)
- && !allow_delete) {
+ if (fromkernel && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE) &&
+ !zrouter.allow_delete) {
rib_install_kernel(rn, same, NULL);
route_unlock_node(rn);
{
zrouter.sequence_num = 0;
+ zrouter.allow_delete = false;
+
zrouter.packets_to_process = ZEBRA_ZAPI_PACKETS_TO_PROCESS;
zrouter.nhg_keep = ZEBRA_DEFAULT_NHG_KEEP_TIMER;
#define ZEBRA_DEFAULT_NHG_KEEP_TIMER 180
uint32_t nhg_keep;
+
+ /* Should we allow non FRR processes to delete our routes */
+ bool allow_delete;
};
#define GRACEFUL_RESTART_TIME 60
#include "zebra/rtadv.h"
#include "zebra/zebra_neigh.h"
-extern int allow_delete;
-
/* context to manage dumps in multiple tables or vrfs */
struct route_show_ctx {
bool multi; /* dump multiple tables or vrf */
"allow-external-route-update",
"Allow FRR routes to be overwritten by external processes\n")
{
- allow_delete = 1;
+ zrouter.allow_delete = true;
return CMD_SUCCESS;
}
NO_STR
"Allow FRR routes to be overwritten by external processes\n")
{
- allow_delete = 0;
+ zrouter.allow_delete = false;
return CMD_SUCCESS;
}
static int config_write_protocol(struct vty *vty)
{
- if (allow_delete)
+ if (zrouter.allow_delete)
vty_out(vty, "allow-external-route-update\n");
if (zrouter.nhg_keep != ZEBRA_DEFAULT_NHG_KEEP_TIMER)
ttable_add_row(table, "Kernel NHG|%s",
zrouter.supports_nhgs ? "Available" : "Unavailable");
+ ttable_add_row(table, "Allow Non FRR route deletion|%s",
+ zrouter.allow_delete ? "Yes" : "No");
ttable_add_row(table, "v4 All LinkDown Routes|%s",
zrouter.all_linkdownv4 ? "On" : "Off");
ttable_add_row(table, "v4 Default LinkDown Routes|%s",