X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=zebra%2Fzebra_mpls_vty.c;h=6b8859e0cae348bdf31e46b733e71a4d8251570b;hb=e88e1c0e891bbbfe532ad9d6e0afdfdf7c911207;hp=fd9b1ae387a14b2855ae2b516ce8ecd8b5e30158;hpb=1c50c7243fee32d18b9f5fd0ab2380f850e3debc;p=mirror_frr.git diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index fd9b1ae38..6b8859e0c 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -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 @@ -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,13 +185,13 @@ 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; } - memset(&p, 0, sizeof(struct prefix)); + memset(&p, 0, sizeof(p)); ret = str2prefix(prefix, &p); if (ret <= 0) { vty_out(vty, "%% Malformed address\n"); @@ -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;