From 81a20ca5d8508f7317f2e023a3be5e5da454d740 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Sep 2023 19:49:15 +0200 Subject: Static: Add syntax for static MPLS labels Instead of just using route attributes, static routes with static MPLS labels can be defined just by e.g.: route 10.1.1.0/24 mpls 100 via 10.1.2.1 mpls 200; --- nest/mpls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nest/mpls.c') diff --git a/nest/mpls.c b/nest/mpls.c index ff76c05d..03180913 100644 --- a/nest/mpls.c +++ b/nest/mpls.c @@ -825,7 +825,9 @@ mpls_free_fec(struct mpls_fec_map *m, struct mpls_fec *fec) DBG("Free FEC %u\n", fec->label); - mpls_free_label(m->domain, m->handle, fec->label); + if (fec->policy != MPLS_POLICY_STATIC) + mpls_free_label(m->domain, m->handle, fec->label); + HASH_REMOVE2(m->label_hash, LABEL, m->pool, fec); switch (fec->policy) -- cgit v1.2.3