summaryrefslogtreecommitdiffstats
path: root/lib/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/if.c b/lib/if.c
index 99fa83719..158303a38 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
*/