summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2012-11-27 19:51:59 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2012-12-12 15:38:08 +0100
commit4fb7c84f1b5e282c7dc413a578d3f42353ac7fec (patch)
tree69fe847ce5ce242c2a714ca75182dc39c7a9b210
parente8aca32f312cbef1cb0b0dd9e87b7e59dc9fa251 (diff)
isisd: fix metrics check for metric-style narrow
When switching to narrow metric style, all configured circuits are verified to have a valid narrow style metric. Check te_metric instead of metric_default as the latter is only 8bit wide and may overflow for wide style metrics. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r--isisd/isisd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 47675f0a..28cd0519 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -2054,7 +2054,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area)
{
if ((area->is_type & IS_LEVEL_1) &&
(circuit->is_type & IS_LEVEL_1) &&
- (circuit->metrics[0].metric_default > MAX_NARROW_LINK_METRIC))
+ (circuit->te_metric[0] > MAX_NARROW_LINK_METRIC))
{
vty_out (vty, "ISIS circuit %s metric is invalid%s",
circuit->interface->name, VTY_NEWLINE);
@@ -2062,7 +2062,7 @@ validate_metric_style_narrow (struct vty *vty, struct isis_area *area)
}
if ((area->is_type & IS_LEVEL_2) &&
(circuit->is_type & IS_LEVEL_2) &&
- (circuit->metrics[1].metric_default > MAX_NARROW_LINK_METRIC))
+ (circuit->te_metric[1] > MAX_NARROW_LINK_METRIC))
{
vty_out (vty, "ISIS circuit %s metric is invalid%s",
circuit->interface->name, VTY_NEWLINE);