+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* IS-IS Rout(e)ing protocol - Multi Topology Support
*
* Copyright (C) 2017 Christian Franke
*
* This file is part of FRRouting (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 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 "isisd/isisd.h"
static char buf[sizeof("65535")];
switch (mtid) {
- case ISIS_MT_IPV4_UNICAST:
- return "ipv4-unicast";
+ case ISIS_MT_STANDARD:
+ return "standard";
case ISIS_MT_IPV4_MGMT:
return "ipv4-mgmt";
case ISIS_MT_IPV6_UNICAST:
{
if (!strcmp(name, "ipv4-unicast"))
return ISIS_MT_IPV4_UNICAST;
+ if (!strcmp(name, "standard"))
+ return ISIS_MT_STANDARD;
if (!strcmp(name, "ipv4-mgmt"))
return ISIS_MT_IPV4_MGMT;
if (!strcmp(name, "ipv6-unicast"))
uint8_t *id, uint32_t metric,
struct isis_ext_subtlvs *ext)
{
+ /* Check if MT is enable for this area */
+ if (!area_is_mt(area)) {
+ lsp_debug(
+ "ISIS (%s): Adding %pPN as te-style neighbor (MT disable)",
+ area->area_tag, id);
+ isis_tlvs_add_extended_reach(tlvs, ISIS_MT_DISABLE, id, metric,
+ ext);
+ return;
+ }
+
+ /* Process Multi-Topology */
for (unsigned int i = 0; i < mt_count; i++) {
uint16_t mtid = mt_set[i];
if (mt_set[i] == ISIS_MT_IPV4_UNICAST) {
- lsp_debug(
- "ISIS (%s): Adding %s.%02x as te-style neighbor",
- area->area_tag, sysid_print(id),
- LSP_PSEUDO_ID(id));
+ lsp_debug("ISIS (%s): Adding %pPN as te-style neighbor",
+ area->area_tag, id);
} else {
lsp_debug(
- "ISIS (%s): Adding %s.%02x as mt-style neighbor for %s",
- area->area_tag, sysid_print(id),
- LSP_PSEUDO_ID(id), isis_mtid2str(mtid));
+ "ISIS (%s): Adding %pPN as mt-style neighbor for %s",
+ area->area_tag, id, isis_mtid2str(mtid));
}
isis_tlvs_add_extended_reach(tlvs, mtid, id, metric, ext);
}