summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--isisd/ChangeLog5
-rw-r--r--isisd/isis_circuit.c28
-rw-r--r--isisd/isis_circuit.h1
3 files changed, 24 insertions, 10 deletions
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 139985e3..04f048a4 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,5 +1,10 @@
2005-09-26 Hasso Tepper <hasso at quagga.net>
+ * isis_circuit.[ch]: Some preliminary support for specifying wide
+ circuit metrics. Needs more thinking though, but should do for now.
+
+2005-09-26 Hasso Tepper <hasso at quagga.net>
+
* isisd.[ch]: Introduce oldmetric flag for area and transition
metricstyle command. With metricstyle wide only extended TLVs
should be used.
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index e885a658..23cb0ac7 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -77,6 +77,7 @@ isis_circuit_new ()
circuit->metrics[i].metric_expense = METRICS_UNSUPPORTED;
circuit->metrics[i].metric_error = METRICS_UNSUPPORTED;
circuit->metrics[i].metric_delay = METRICS_UNSUPPORTED;
+ circuit->te_metric[i] = DEFAULT_CIRCUIT_METRICS;
}
}
else
@@ -785,12 +786,12 @@ isis_interface_config_write (struct vty *vty)
}
}
/* ISIS - Metric */
- if (c->metrics[0].metric_default == c->metrics[1].metric_default)
+ if (c->te_metric[0] == c->te_metric[1])
{
- if (c->metrics[0].metric_default != DEFAULT_CIRCUIT_METRICS)
+ if (c->te_metric[0] != DEFAULT_CIRCUIT_METRICS)
{
- vty_out (vty, " isis metric %d%s",
- c->metrics[0].metric_default, VTY_NEWLINE);
+ vty_out (vty, " isis metric %d%s", c->te_metric[0],
+ VTY_NEWLINE);
write++;
}
}
@@ -798,11 +799,10 @@ isis_interface_config_write (struct vty *vty)
{
for (i = 0; i < 2; i++)
{
- if (c->metrics[i].metric_default != DEFAULT_CIRCUIT_METRICS)
+ if (c->te_metric[i] != DEFAULT_CIRCUIT_METRICS)
{
vty_out (vty, " isis metric %d level-%d%s",
- c->metrics[i].metric_default, i + 1,
- VTY_NEWLINE);
+ c->te_metric[i], i + 1, VTY_NEWLINE);
write++;
}
}
@@ -1235,7 +1235,7 @@ ALIAS (no_isis_priority_l2,
/* Metric command */
DEFUN (isis_metric,
isis_metric_cmd,
- "isis metric <0-63>",
+ "isis metric <0-16777215>",
"IS-IS commands\n"
"Set default metric for circuit\n"
"Default metric value\n")
@@ -1254,6 +1254,12 @@ ALIAS (no_isis_priority_l2,
met = atoi (argv[0]);
+ circuit->te_metric[0] = met;
+ circuit->te_metric[1] = met;
+
+ if (met > 63)
+ met = 63;
+
circuit->metrics[0].metric_default = met;
circuit->metrics[1].metric_default = met;
@@ -1278,6 +1284,8 @@ DEFUN (no_isis_metric,
}
assert (circuit);
+ circuit->te_metric[0] = DEFAULT_CIRCUIT_METRICS;
+ circuit->te_metric[1] = DEFAULT_CIRCUIT_METRICS;
circuit->metrics[0].metric_default = DEFAULT_CIRCUIT_METRICS;
circuit->metrics[1].metric_default = DEFAULT_CIRCUIT_METRICS;
@@ -1286,14 +1294,14 @@ DEFUN (no_isis_metric,
ALIAS (no_isis_metric,
no_isis_metric_arg_cmd,
- "no isis metric <0-127>",
+ "no isis metric <0-16777215>",
NO_STR
"IS-IS commands\n"
"Set default metric for circuit\n"
"Default metric value\n")
/* end of metrics */
- DEFUN (isis_hello_interval,
+DEFUN (isis_hello_interval,
isis_hello_interval_cmd,
"isis hello-interval (<1-65535>|minimal)",
"IS-IS commands\n"
diff --git a/isisd/isis_circuit.h b/isisd/isis_circuit.h
index 484c0575..b5ef269c 100644
--- a/isisd/isis_circuit.h
+++ b/isisd/isis_circuit.h
@@ -108,6 +108,7 @@ struct isis_circuit
u_int16_t csnp_interval[2]; /* level-1 csnp-interval in seconds */
u_int16_t psnp_interval[2]; /* level-1 psnp-interval in seconds */
struct metric metrics[2]; /* l1XxxMetric */
+ u_int32_t te_metric[2];
struct password *c_rx_passwds; /* circuitReceivePasswords */
struct password *c_tc_passwd; /* circuitTransmitPassword */
int ip_router; /* Route IP ? */