{
struct stream *s;
struct zapi_labels zl;
- int ret;
/* Get input stream. */
s = msg;
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);
}
/*
{
struct stream *s;
struct zapi_labels zl;
- int ret;
/* Get input stream. */
s = msg;
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);
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;
/* 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);
break;
}
if (re == NULL)
- return -1;
+ return;
/*
* Nexthops are now shared by multiple routes, so we have to make
zebra_nhg_free(new_nhe);
rib_queue_add(rn);
-
- return 0;
}
/*
* 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];
/* 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;
if (new_nhe)
zebra_nhg_free(new_nhe);
-
- return ret;
}
/*
* 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