From: Christian Franke Date: Tue, 27 Nov 2012 19:52:00 +0000 (+0000) Subject: isisd: verify metrics on metric-style transition X-Git-Tag: frr-2.0-rc1~1729 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=478c1125cfcf92c3f2a574d6b76eea28126284dc;p=mirror%2Ffrr.git 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 --- diff --git a/isisd/isisd.c b/isisd/isisd.c index 28cd051994..ce6a26214e 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;