summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_te.c5
-rw-r--r--ospfd/ospf_vty.c4
2 files changed, 3 insertions, 6 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 2e7b420161..ec9a14590d 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -2304,12 +2304,9 @@ DEFUN (no_ospf_mpls_te,
MPLS_TE_STR
"Disable the MPLS-TE functionality\n")
{
+ VTY_DECLVAR_CONTEXT(ospf, ospf);
struct listnode *node, *nnode;
struct mpls_te_link *lp;
- struct ospf *ospf = vty->index;
-
- if (!ospf)
- return CMD_SUCCESS;
if (OspfMplsTE.status == disabled)
return CMD_SUCCESS;
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 334c0e96a9..a670e8de62 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -163,7 +163,7 @@ DEFUN (router_ospf,
if (argc > 2)
VTY_GET_INTEGER ("Instance", instance, argv[2]->arg);
- /* The following logic to set the vty->index is in place to be able
+ /* The following logic to set the vty qobj index is in place to be able
to ignore the commands which dont belong to this instance. */
if (ospf->instance != instance)
VTY_PUSH_CONTEXT_NULL(OSPF_NODE);
@@ -172,7 +172,7 @@ DEFUN (router_ospf,
if (IS_DEBUG_OSPF_EVENT)
zlog_debug ("Config command 'router ospf %d' received", instance);
ospf->oi_running = 1;
- vty->index = ospf;
+ VTY_PUSH_CONTEXT(OSPF_NODE, ospf);
ospf_router_id_update (ospf);
}