diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-05-09 06:34:59 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 20:16:12 +0200 |
commit | 7f8a9cbab7922be545a96af91d72fe38caf8e197 (patch) | |
tree | f53dbef5132a2b7012d4f465b76c5b3ac5907a70 /ripd/ripd.c | |
parent | ripd: retrofit the 'default-metric' command to the new northbound model (diff) | |
download | frr-7f8a9cbab7922be545a96af91d72fe38caf8e197.tar.xz frr-7f8a9cbab7922be545a96af91d72fe38caf8e197.zip |
ripd: retrofit the 'distance' command to the new northbound model
Trivial conversion.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r-- | ripd/ripd.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c index 1ae1d29eb..d85ebcc53 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -3157,7 +3157,7 @@ static void rip_distance_show(struct vty *vty) int header = 1; char buf[BUFSIZ]; - vty_out(vty, " Distance: (default is %d)\n", + vty_out(vty, " Distance: (default is %u)\n", rip->distance ? rip->distance : ZEBRA_RIP_DISTANCE_DEFAULT); for (rn = route_top(rip_distance_table); rn; rn = route_next(rn)) @@ -3176,28 +3176,6 @@ static void rip_distance_show(struct vty *vty) } } -DEFUN (rip_distance, - rip_distance_cmd, - "distance (1-255)", - "Administrative distance\n" - "Distance value\n") -{ - int idx_number = 1; - rip->distance = atoi(argv[idx_number]->arg); - return CMD_SUCCESS; -} - -DEFUN (no_rip_distance, - no_rip_distance_cmd, - "no distance (1-255)", - NO_STR - "Administrative distance\n" - "Distance value\n") -{ - rip->distance = 0; - return CMD_SUCCESS; -} - DEFUN (rip_distance_source, rip_distance_source_cmd, "distance (1-255) A.B.C.D/M", @@ -3591,10 +3569,6 @@ static int config_write_rip(struct vty *vty) /* Interface routemap configuration */ write += config_write_if_rmap(vty); - /* Distance configuration. */ - if (rip->distance) - vty_out(vty, " distance %d\n", rip->distance); - /* RIP source IP prefix distance configuration. */ for (rn = route_top(rip_distance_table); rn; rn = route_next(rn)) @@ -3889,8 +3863,6 @@ void rip_init(void) install_element(RIP_NODE, &no_rip_timers_cmd); install_element(RIP_NODE, &rip_route_cmd); install_element(RIP_NODE, &no_rip_route_cmd); - install_element(RIP_NODE, &rip_distance_cmd); - install_element(RIP_NODE, &no_rip_distance_cmd); install_element(RIP_NODE, &rip_distance_source_cmd); install_element(RIP_NODE, &no_rip_distance_source_cmd); install_element(RIP_NODE, &rip_distance_source_access_list_cmd); |