summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2023-07-18 15:15:39 +0000
committerGitHub <noreply@github.com>2023-07-18 15:15:39 +0000
commit712e40c409935eb03a584eb1b995ea9d24447cd0 (patch)
tree0f93481b70dc0ddaa74cb41d77d0154d7746b08d /zebra/zebra_mpls_vty.c
parent4a986f20d74b5feb8db94ac9d6147950b6b5bd14 (diff)
parentf8d94e8a628d123f299a4f388c58c8f8b222c6c2 (diff)
Merge pull request #11831 from anlancs/fix/cleanup-default
zebra: remove unnecessary check for default vrf
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index 6b8859e0ca..e64e7009b4 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -42,10 +42,6 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
}
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf) {
- vty_out(vty, "%% Default VRF does not exist\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
if (!inlabel_str) {
vty_out(vty, "%% No Label Information\n");
@@ -186,10 +182,6 @@ static int zebra_mpls_bind(struct vty *vty, int add_cmd, const char *prefix,
int ret;
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf) {
- vty_out(vty, "%% Default VRF does not exist\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
memset(&p, 0, sizeof(p));
ret = str2prefix(prefix, &p);
@@ -274,8 +266,6 @@ static int zebra_mpls_config(struct vty *vty)
struct zebra_vrf *zvrf;
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf)
- return 0;
write += zebra_mpls_write_lsp_config(vty, zvrf);
write += zebra_mpls_write_fec_config(vty, zvrf);
@@ -297,8 +287,6 @@ DEFUN (show_mpls_fec,
int ret;
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf)
- return 0;
if (argc == 3)
zebra_mpls_print_fec_table(vty, zvrf);
@@ -373,10 +361,6 @@ static int zebra_mpls_global_block(struct vty *vty, int add_cmd,
struct zebra_vrf *zvrf;
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (!zvrf) {
- vty_out(vty, "%% Default VRF does not exist\n");
- return CMD_WARNING_CONFIG_FAILED;
- }
if (add_cmd) {
if (!start_label_str || !end_label_str) {