#include "isisd/isis_te.h"
#include "isisd/isis_mt.h"
#include "isisd/fabricd.h"
+#include "isisd/isis_nb.h"
struct isis *isis = NULL;
int isis_config_write(struct vty *);
-void isis_new(unsigned long process_id)
+void isis_new(unsigned long process_id, vrf_id_t vrf_id)
{
isis = XCALLOC(MTYPE_ISIS, sizeof(struct isis));
/*
* Default values
*/
+ isis->vrf_id = vrf_id;
isis->max_area_addrs = 3;
isis->process_id = process_id;
isis->router_id = 0;
isis->init_circ_list = list_new();
isis->uptime = time(NULL);
isis->nexthops = list_new();
- isis->nexthops6 = list_new();
dyn_cache_init();
/*
* uncomment the next line for full debugs
*/
/* isis->debugs = 0xFFFF; */
- isisMplsTE.status = disable; /* Only support TE metric */
QOBJ_REG(isis, isis);
}
/*
* Fabricd runs only as level-2.
- * For IS-IS, the first instance is level-1-2 rest are level-1,
- * unless otherwise configured
+ * For IS-IS, the default is level-1-2
*/
- if (fabricd) {
+ if (fabricd)
area->is_type = IS_LEVEL_2;
- } else if (listcount(isis->area_list) == 0)
- area->is_type = IS_LEVEL_1_AND_2;
else
area->is_type = yang_get_default_enum(
"/frr-isisd:isis/instance/is-type");
if (fabricd)
fabricd_finish(area->fabricd);
+ /* Disable MPLS if necessary before flooding LSP */
+ if (IS_MPLS_TE(area->mta))
+ area->mta->status = disable;
+
if (area->circuit_list) {
for (ALL_LIST_ELEMENTS(area->circuit_list, node, nnode,
circuit)) {
lsp_db_fini(&area->lspdb[1]);
/* invalidate and verify to delete all routes from zebra */
- isis_area_invalidate_routes(area, ISIS_LEVEL1 & ISIS_LEVEL2);
+ isis_area_invalidate_routes(area, area->is_type);
isis_area_verify_routes(area);
spftree_area_del(area);
*/
void print_debug(struct vty *vty, int flags, int onoff)
{
- char onoffs[4];
- if (onoff)
- strcpy(onoffs, "on");
- else
- strcpy(onoffs, "off");
+ const char *onoffs = onoff ? "on" : "off";
if (flags & DEBUG_ADJ_PACKETS)
vty_out(vty,
write += area_write_mt_settings(area, vty);
write += fabricd_write_settings(area, vty);
}
- isis_mpls_te_config_write_router(vty);
}
return write;