From 73ffb25bec41d729b0dac34d17b6ccd4aa25803b Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 19 Apr 2003 15:49:49 +0000 Subject: 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. --- ripngd/ripng_routemap.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'ripngd') 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 () { -- cgit v1.2.1