mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 02:46:37 +00:00
zebra: Remove unused return codes in zebra_mpls.c
There are some return codes for functions that are not really used. Clean them up. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
a310ebc114
commit
1548fbbc44
@ -2492,7 +2492,6 @@ static void zread_mpls_labels_add(ZAPI_HANDLER_ARGS)
|
||||
{
|
||||
struct stream *s;
|
||||
struct zapi_labels zl;
|
||||
int ret;
|
||||
|
||||
/* Get input stream. */
|
||||
s = msg;
|
||||
@ -2510,12 +2509,7 @@ static void zread_mpls_labels_add(ZAPI_HANDLER_ARGS)
|
||||
if (zapi_labels_validate(&zl) < 0)
|
||||
return;
|
||||
|
||||
ret = mpls_zapi_labels_process(true, zvrf, &zl);
|
||||
if (ret < 0) {
|
||||
if (IS_ZEBRA_DEBUG_RECV)
|
||||
zlog_debug("%s: Error processing zapi request",
|
||||
__func__);
|
||||
}
|
||||
mpls_zapi_labels_process(true, zvrf, &zl);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2532,7 +2526,6 @@ static void zread_mpls_labels_delete(ZAPI_HANDLER_ARGS)
|
||||
{
|
||||
struct stream *s;
|
||||
struct zapi_labels zl;
|
||||
int ret;
|
||||
|
||||
/* Get input stream. */
|
||||
s = msg;
|
||||
@ -2547,12 +2540,7 @@ static void zread_mpls_labels_delete(ZAPI_HANDLER_ARGS)
|
||||
return;
|
||||
|
||||
if (zl.nexthop_num > 0) {
|
||||
ret = mpls_zapi_labels_process(false /*delete*/, zvrf, &zl);
|
||||
if (ret < 0) {
|
||||
if (IS_ZEBRA_DEBUG_RECV)
|
||||
zlog_debug("%s: Error processing zapi request",
|
||||
__func__);
|
||||
}
|
||||
mpls_zapi_labels_process(false /*delete*/, zvrf, &zl);
|
||||
} else {
|
||||
mpls_lsp_uninstall_all_vrf(zvrf, zl.type, zl.local_label);
|
||||
|
||||
|
@ -2747,9 +2747,9 @@ static bool ftn_update_nexthop(bool add_p, struct nexthop *nexthop,
|
||||
return true;
|
||||
}
|
||||
|
||||
int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
struct prefix *prefix, uint8_t route_type,
|
||||
unsigned short route_instance)
|
||||
void mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
struct prefix *prefix, uint8_t route_type,
|
||||
unsigned short route_instance)
|
||||
{
|
||||
struct route_table *table;
|
||||
struct route_node *rn;
|
||||
@ -2761,7 +2761,7 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
/* Lookup table. */
|
||||
table = zebra_vrf_table(afi, SAFI_UNICAST, zvrf_id(zvrf));
|
||||
if (!table)
|
||||
return -1;
|
||||
return;
|
||||
|
||||
/* Lookup existing route */
|
||||
rn = route_node_get(table, prefix);
|
||||
@ -2772,7 +2772,7 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
break;
|
||||
}
|
||||
if (re == NULL)
|
||||
return -1;
|
||||
return;
|
||||
|
||||
/*
|
||||
* Nexthops are now shared by multiple routes, so we have to make
|
||||
@ -2801,8 +2801,6 @@ int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
zebra_nhg_free(new_nhe);
|
||||
|
||||
rib_queue_add(rn);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2884,8 +2882,8 @@ static bool ftn_update_znh(bool add_p, enum lsp_types_t type,
|
||||
* There are several changes that need to be made, in several zebra
|
||||
* data structures, so we want to do all the work required at once.
|
||||
*/
|
||||
int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||
const struct zapi_labels *zl)
|
||||
void mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||
const struct zapi_labels *zl)
|
||||
{
|
||||
int i, counter, ret = 0;
|
||||
char buf[NEXTHOP_STRLEN];
|
||||
@ -2906,7 +2904,7 @@ int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||
/* Lookup table. */
|
||||
lsp_table = zvrf->lsp_table;
|
||||
if (!lsp_table)
|
||||
return -1;
|
||||
return;
|
||||
|
||||
/* Find or create LSP object */
|
||||
tmp_ile.in_label = zl->local_label;
|
||||
@ -3070,8 +3068,6 @@ znh_done:
|
||||
|
||||
if (new_nhe)
|
||||
zebra_nhg_free(new_nhe);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -261,15 +261,15 @@ void zebra_mpls_print_fec(struct vty *vty, struct zebra_vrf *zvrf,
|
||||
* Handle zapi request to install/uninstall LSP and
|
||||
* (optionally) FEC-To-NHLFE (FTN) bindings.
|
||||
*/
|
||||
int mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||
const struct zapi_labels *zl);
|
||||
void mpls_zapi_labels_process(bool add_p, struct zebra_vrf *zvrf,
|
||||
const struct zapi_labels *zl);
|
||||
|
||||
/*
|
||||
* Uninstall all NHLFEs bound to a single FEC.
|
||||
*/
|
||||
int mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
struct prefix *prefix, uint8_t route_type,
|
||||
unsigned short route_instance);
|
||||
void mpls_ftn_uninstall(struct zebra_vrf *zvrf, enum lsp_types_t type,
|
||||
struct prefix *prefix, uint8_t route_type,
|
||||
unsigned short route_instance);
|
||||
|
||||
/*
|
||||
* Install/update a NHLFE for an LSP in the forwarding table. This may be
|
||||
|
Loading…
Reference in New Issue
Block a user