diff options
Diffstat (limited to 'ospfd/ospf_te.c')
| -rw-r--r-- | ospfd/ospf_te.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 321c035d3a..c691aac040 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -2264,12 +2264,9 @@ DEFUN (ospf_mpls_te_on, MPLS_TE_STR "Enable the MPLS-TE functionality\n") { + VTY_DECLVAR_CONTEXT(ospf, ospf); struct listnode *node; struct mpls_te_link *lp; - struct ospf *ospf = vty->index; - - if (!ospf) - return CMD_SUCCESS; if (OspfMplsTE.status == enabled) return CMD_SUCCESS; @@ -2304,12 +2301,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; @@ -2334,13 +2328,10 @@ DEFUN (ospf_mpls_te_router_addr, "Stable IP address of the advertising router\n" "MPLS-TE router address in IPv4 address format\n") { + VTY_DECLVAR_CONTEXT(ospf, ospf); int idx_ipv4 = 2; struct te_tlv_router_addr *ra = &OspfMplsTE.router_addr; struct in_addr value; - struct ospf *ospf = vty->index; - - if (!ospf) - return CMD_SUCCESS; if (! inet_aton (argv[idx_ipv4]->arg, &value)) { |
