From 788a036fdb57d733371b180d1d295ce6ca72bf5d Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Mon, 24 Jan 2022 00:07:20 +0300 Subject: *: do not print vrf name for interface config when using vrf-lite VRF name should not be printed in the config since 574445ec. The update was done for NB config output but I missed it for regular vty output. Signed-off-by: Igor Ryzhov --- lib/if.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib/if.c') diff --git a/lib/if.c b/lib/if.c index 99fa83719a..158303a387 100644 --- a/lib/if.c +++ b/lib/if.c @@ -1285,6 +1285,22 @@ static void cli_show_interface_end(struct vty *vty, vty_out(vty, "exit\n"); } +void if_vty_config_start(struct vty *vty, struct interface *ifp) +{ + vty_frame(vty, "!\n"); + vty_frame(vty, "interface %s", ifp->name); + + if (vrf_is_backend_netns() && strcmp(ifp->vrf->name, VRF_DEFAULT_NAME)) + vty_frame(vty, " vrf %s", ifp->vrf->name); + + vty_frame(vty, "\n"); +} + +void if_vty_config_end(struct vty *vty) +{ + vty_endframe(vty, "exit\n!\n"); +} + /* * XPath: /frr-interface:lib/interface/description */ -- cgit v1.2.3