summaryrefslogtreecommitdiffstats
path: root/isisd
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2017-05-06 15:50:41 +0200
committerChristian Franke <chris@opensourcerouting.org>2017-05-06 15:50:41 +0200
commitc3ea390638648112b57b1cb0e445952e1e279f43 (patch)
treee5df4ed495b9d229014a60677737c7a3d99be8c3 /isisd
parentisisd: fix initialization of ES vertizes (diff)
downloadfrr-c3ea390638648112b57b1cb0e445952e1e279f43.tar.xz
frr-c3ea390638648112b57b1cb0e445952e1e279f43.zip
isisd: ensure that MT is only used with wide metrics
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r--isisd/isis_vty.c26
-rw-r--r--isisd/isisd.c14
2 files changed, 40 insertions, 0 deletions
diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c
index 1658ca373..9cae5f9a5 100644
--- a/isisd/isis_vty.c
+++ b/isisd/isis_vty.c
@@ -1284,6 +1284,13 @@ DEFUN (circuit_topology,
return CMD_ERR_NO_MATCH;
const char *arg = argv[2]->arg;
uint16_t mtid = isis_str2mtid(arg);
+
+ if (circuit->area && circuit->area->oldmetric)
+ {
+ vty_out (vty, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
if (mtid == (uint16_t)-1)
{
vty_out (vty, "Don't know topology '%s'%s", arg, VTY_NEWLINE);
@@ -1306,6 +1313,13 @@ DEFUN (no_circuit_topology,
return CMD_ERR_NO_MATCH;
const char *arg = argv[3]->arg;
uint16_t mtid = isis_str2mtid(arg);
+
+ if (circuit->area && circuit->area->oldmetric)
+ {
+ vty_out (vty, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
if (mtid == (uint16_t)-1)
{
vty_out (vty, "Don't know topology '%s'%s", arg, VTY_NEWLINE);
@@ -1371,6 +1385,12 @@ DEFUN (metric_style,
return CMD_SUCCESS;
}
+ if (area_is_mt(area))
+ {
+ vty_out (vty, "Narrow metrics cannot be used while multi topology IS-IS is active%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
ret = validate_metric_style_narrow (vty, area);
if (ret != CMD_SUCCESS)
return ret;
@@ -1393,6 +1413,12 @@ DEFUN (no_metric_style,
VTY_DECLVAR_CONTEXT (isis_area, area);
int ret;
+ if (area_is_mt(area))
+ {
+ vty_out (vty, "Narrow metrics cannot be used while multi topology IS-IS is active%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
ret = validate_metric_style_narrow (vty, area);
if (ret != CMD_SUCCESS)
return ret;
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 179e43098..d11044377 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -1669,6 +1669,13 @@ DEFUN (isis_topology,
const char *arg = argv[1]->arg;
uint16_t mtid = isis_str2mtid(arg);
+
+ if (area->oldmetric)
+ {
+ vty_out (vty, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
if (mtid == (uint16_t)-1)
{
vty_out (vty, "Don't know topology '%s'%s", arg, VTY_NEWLINE);
@@ -1697,6 +1704,13 @@ DEFUN (no_isis_topology,
const char *arg = argv[2]->arg;
uint16_t mtid = isis_str2mtid(arg);
+
+ if (area->oldmetric)
+ {
+ vty_out (vty, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE);
+ return CMD_ERR_AMBIGUOUS;
+ }
+
if (mtid == (uint16_t)-1)
{
vty_out (vty, "Don't know topology '%s'%s", arg, VTY_NEWLINE);