From: Donatas Abraitis Date: Mon, 7 Nov 2022 20:23:07 +0000 (+0200) Subject: ospfd: Get route-map name for default-information originate X-Git-Tag: docker/8.4.1~15^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4a21c603e075eb606b33880f8ad9044a39a48a36;p=mirror%2Ffrr.git ospfd: Get route-map name for default-information originate LR1.wue3(config)# route-map foo-bar-baz10 permit 10 LR1.wue3(config-route-map)# exit LR1.wue3(config)# router ospf LR1.wue3(config-router)# ospf router-id 172.18.254.201 LR1.wue3(config-router)# log-adjacency-changes LR1.wue3(config-router)# default-information originate metric 50 metric-type 1 route-map foo-bar-baz10 LR1.wue3(config-router)# end Results in: LR1.wue3# show run ... ! router ospf ospf router-id 172.18.254.201 log-adjacency-changes default-information originate metric 50 metric-type 1 route-map oute-map exit ! route-map foo-bar-baz10 permit 10 exit ! end Let's fix this. Signed-off-by: Donatas Abraitis (cherry picked from commit bd162aae094360605b7f4b9b8cd46f6e4ffebc04) --- diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index c957c8c014..b9f154ad03 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -9412,7 +9412,7 @@ DEFUN (ospf_default_information_originate, idx = 1; /* Get route-map */ if (argv_find(argv, argc, "route-map", &idx)) - rtmap = argv[idx]->arg + 1; + rtmap = argv[idx + 1]->arg; /* To check if user is providing same route map */ if ((!rtmap && !ROUTEMAP_NAME(red)) ||