diff options
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -683,12 +683,11 @@ DEFUN (interface_desc, "Interface specific description\n" "Characters describing this interface\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT (interface, ifp); if (argc == 0) return CMD_SUCCESS; - ifp = vty->index; if (ifp->desc) XFREE (MTYPE_TMP, ifp->desc); ifp->desc = argv_concat(argv, argc, 0); @@ -702,9 +701,8 @@ DEFUN (no_interface_desc, NO_STR "Interface specific description\n") { - struct interface *ifp; + VTY_DECLVAR_CONTEXT (interface, ifp); - ifp = vty->index; if (ifp->desc) XFREE (MTYPE_TMP, ifp->desc); ifp->desc = NULL; @@ -788,8 +786,7 @@ DEFUN (interface, vty_out (vty, "%% interface %s not in %s%s", argv[0], argv[1], VTY_NEWLINE); return CMD_WARNING; } - vty->index = ifp; - vty->node = INTERFACE_NODE; + VTY_PUSH_CONTEXT_COMPAT (INTERFACE_NODE, ifp); return CMD_SUCCESS; } @@ -862,8 +859,7 @@ DEFUN (vrf, vrfp = vrf_get (VRF_UNKNOWN, argv[0]); - vty->index = vrfp; - vty->node = VRF_NODE; + VTY_PUSH_CONTEXT_COMPAT (VRF_NODE, vrfp); return CMD_SUCCESS; } |
