Isn't that the purpose of exit? The command ' already there, it's just missing from config_write...

Lou


On January 4, 2016 9:42:47 PM Donald Sharp <[email protected]> wrote:

Why not use '!' instead of 'exit'.  I assume the goal is to signal that we
are done route-map input.

I would prefer that we come up with a methodology to handle this for all
end blocks, instead of just for route-maps.

donald

On Thu, Dec 24, 2015 at 1:10 PM, Lou Berger <[email protected]> wrote:

The last route-map written to config should have an "exit" at the end to
return to the main node from route-map processing.

Signed-off-by: Lou Berger <[email protected]>
Signed-off-by: David Lamparter <[email protected]>
---
 lib/routemap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/routemap.c b/lib/routemap.c
index 7302e23..116c8bd 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1288,6 +1288,8 @@ route_map_config_write (struct vty *vty)

        write++;
       }
+  if (!first)
+    vty_out (vty, " exit%s", VTY_NEWLINE);
   return write;
 }

--
2.1.3


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to