diff options
author | Christian Franke <chris@opensourcerouting.org> | 2012-11-27 19:52:00 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-12-12 15:38:08 +0100 |
commit | 478c1125cfcf92c3f2a574d6b76eea28126284dc (patch) | |
tree | a53e56a4ad3d5342a36b967ae968a2523840c0bb /isisd | |
parent | 4fb7c84f1b5e282c7dc413a578d3f42353ac7fec (diff) |
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 <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isisd.c | 19 |
1 files 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; |