]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/zebra_mpls_vty.c
zebra: Fix missing VRF flag
[mirror_frr.git] / zebra / zebra_mpls_vty.c
index ca66e0310a4fa8f35adfa0c105f6d3d34c841ca9..6b8859e0cae348bdf31e46b733e71a4d8251570b 100644 (file)
@@ -1,21 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /* Zebra MPLS VTY functions
  * Copyright (C) 2002 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include <zebra.h>
@@ -56,7 +41,7 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
                return CMD_WARNING_CONFIG_FAILED;
        }
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        if (!zvrf) {
                vty_out(vty, "%% Default VRF does not exist\n");
                return CMD_WARNING_CONFIG_FAILED;
@@ -200,7 +185,7 @@ static int zebra_mpls_bind(struct vty *vty, int add_cmd, const char *prefix,
        uint32_t label;
        int ret;
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        if (!zvrf) {
                vty_out(vty, "%% Default VRF does not exist\n");
                return CMD_WARNING_CONFIG_FAILED;
@@ -288,7 +273,7 @@ static int zebra_mpls_config(struct vty *vty)
        int write = 0;
        struct zebra_vrf *zvrf;
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        if (!zvrf)
                return 0;
 
@@ -311,7 +296,7 @@ DEFUN (show_mpls_fec,
        struct prefix p;
        int ret;
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        if (!zvrf)
                return 0;
 
@@ -341,7 +326,7 @@ DEFUN (show_mpls_table,
        struct zebra_vrf *zvrf;
        bool uj = use_json(argc, argv);
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        zebra_mpls_print_lsp_table(vty, zvrf, uj);
        return CMD_SUCCESS;
 }
@@ -359,7 +344,7 @@ DEFUN (show_mpls_table_lsp,
        struct zebra_vrf *zvrf;
        bool uj = use_json(argc, argv);
 
-       zvrf = vrf_info_lookup(VRF_DEFAULT);
+       zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
        label = atoi(argv[3]->arg);
        zebra_mpls_print_lsp(vty, zvrf, label, uj);
        return CMD_SUCCESS;