[VTY] Remove OpenBSC specific node-exit handling from src/vty

The idea is to move the VTY code into libosmocore at some point,
and for that we need to eliminate OpenBSC specifics from it
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 029f0c4..5aa24d3 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -51,6 +51,20 @@
 	1,
 };
 
+/* Down vty node level. */
+DEFUN(subscr_node_exit,
+      subscr_node_exit_cmd, "exit", "Exit current mode and down to previous mode\n")
+{
+	switch (vty->node) {
+	case SUBSCR_NODE:
+		vty->node = VIEW_NODE;
+		subscr_put(vty->index);
+		vty->index = NULL;
+		break;
+	}
+	return CMD_SUCCESS;
+}
+
 static int dummy_config_write(struct vty *v)
 {
 	return CMD_SUCCESS;
@@ -542,6 +556,7 @@
 	install_node(&subscr_node, dummy_config_write);
 
 	install_default(SUBSCR_NODE);
+	install_element(SUBSCR_NODE, &subscr_node_exit_cmd);
 	install_element(SUBSCR_NODE, &cfg_subscr_name_cmd);
 	install_element(SUBSCR_NODE, &cfg_subscr_extension_cmd);
 	install_element(SUBSCR_NODE, &cfg_subscr_authorized_cmd);