From 478c1125cfcf92c3f2a574d6b76eea28126284dc Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 27 Nov 2012 19:52:00 +0000 Subject: isisd: verify metrics on metric-style transition When switching to metric-style transition, circuit metrics should also be verified to be in the narrow range 0..63. Signed-off-by: Christian Franke Signed-off-by: David Lamparter --- isisd/isisd.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/isisd/isisd.c b/isisd/isisd.c index 28cd0519..ce6a2621 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -2092,19 +2092,22 @@ DEFUN (metric_style, area->newmetric = 1; area->oldmetric = 0; } - else if (strncmp (argv[0], "t", 1) == 0) - { - area->newmetric = 1; - area->oldmetric = 1; - } - else if (strncmp (argv[0], "n", 1) == 0) + else { ret = validate_metric_style_narrow (vty, area); if (ret != CMD_SUCCESS) return ret; - area->newmetric = 0; - area->oldmetric = 1; + if (strncmp (argv[0], "t", 1) == 0) + { + area->newmetric = 1; + area->oldmetric = 1; + } + else if (strncmp (argv[0], "n", 1) == 0) + { + area->newmetric = 0; + area->oldmetric = 1; + } } return CMD_SUCCESS; -- cgit v1.2.1