summaryrefslogtreecommitdiff
path: root/ripngd
diff options
context:
space:
mode:
authorpaul <paul>2003-04-19 15:49:49 +0000
committerpaul <paul>2003-04-19 15:49:49 +0000
commit73ffb25bec41d729b0dac34d17b6ccd4aa25803b (patch)
tree69906ad70c8dd767c51677480f8034a3be3f5edd /ripngd
parent147193a28a19f2f98545b14ad38935423415f53e (diff)
Hasso Tepper
http://hasso.linux.ee/zebra/ht-routemap-18042003_5.patch Trivial fixes to sync daemon's route-map commands to have same syntax. Fixes a lot of errors with "match ..." and "set ..." commands when using vtysh.
Diffstat (limited to 'ripngd')
-rw-r--r--ripngd/ripng_routemap.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/ripngd/ripng_routemap.c b/ripngd/ripng_routemap.c
index f237e6b6..832f17c9 100644
--- a/ripngd/ripng_routemap.c
+++ b/ripngd/ripng_routemap.c
@@ -158,7 +158,9 @@ route_set_metric_compile (char *arg)
if (metric == LONG_MAX || *endptr != '\0')
return NULL;
- if (metric < 0 || metric > RIPNG_METRIC_INFINITY)
+ /* Commented out by Hasso Tepper, to avoid problems in vtysh. */
+ /* if (metric < 0 || metric > RIPNG_METRIC_INFINITY) */
+ if (metric < 0)
return NULL;
mod = XMALLOC (MTYPE_ROUTE_MAP_COMPILED,
@@ -314,15 +316,25 @@ DEFUN (set_metric,
DEFUN (no_set_metric,
no_set_metric_cmd,
- "no set metric <0-4294967295>",
+ "no set metric",
NO_STR
- "Set value\n"
- "Metric\n"
- "METRIC value\n")
+ SET_STR
+ "Metric value for destination routing protocol\n")
{
+ if (argc == 0)
+ return ripng_route_set_delete (vty, vty->index, "metric", NULL);
+
return ripng_route_set_delete (vty, vty->index, "metric", argv[0]);
}
+ALIAS (no_set_metric,
+ no_set_metric_val_cmd,
+ "no set metric <0-4294967295>",
+ NO_STR
+ SET_STR
+ "Metric value for destination routing protocol\n"
+ "Metric value\n")
+
void
ripng_route_map_init ()
{