summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-03-28 15:49:50 -0400
committerDonald Sharp <sharpd@nvidia.com>2023-03-28 15:49:50 -0400
commit9a7d1e7427a1c7d24e270ad12cd3f45be49e9a51 (patch)
treeb95d6fbcc770a2ffc44ea6f8d1d727c4b21bd8e4 /zebra/zebra_mpls_vty.c
parent9b00c0a1657230ad9f2a437651cd05c3b7e02d06 (diff)
zebra: Use zebra_vrf_lookup_by_id when we can
Let's make this as consistent as is possible. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index 7e3cdd738e..6b8859e0ca 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -41,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;
@@ -185,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;
@@ -273,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;
@@ -296,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;
@@ -326,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;
}
@@ -344,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;