diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-09-26 18:50:20 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-10-04 13:12:05 +0200 |
commit | 9b775859cd7fd54a6fe2bd88359955fce079999d (patch) | |
tree | 570b70589b3eb920b817143e52bc5741da31e80d /nest/rt-table.c | |
parent | e915f99e1cd4f6c90e640f7290c201633ab992f0 (diff) |
MPLS: Handle label allocation failures
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r-- | nest/rt-table.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 6eaee069..e497524f 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1614,7 +1614,14 @@ rte_update2(struct channel *c, const net_addr *n, rte *new, struct rte_src *src) } if (p->mpls_map) - mpls_handle_rte(p->mpls_map, n, new, rte_update_pool, &fec); + { + if (mpls_handle_rte(p->mpls_map, n, new, rte_update_pool, &fec) < 0) + { + rte_trace_in(D_FILTERS, c, new, "invalid"); + stats->imp_updates_invalid++; + goto drop; + } + } if (!rta_is_cached(new->attrs)) /* Need to copy attributes */ new->attrs = rta_lookup(new->attrs); |