aboutsummaryrefslogtreecommitdiffstats
path: root/nest
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2023-09-22 19:49:15 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-10-04 13:12:05 +0200
commit81a20ca5d8508f7317f2e023a3be5e5da454d740 (patch)
tree92cf4105fbe6d14bcb837235a95117f8df43d1cb /nest
parent35726051517aaf1869458caed03c7ee1c516721c (diff)
downloadbird-81a20ca5d8508f7317f2e023a3be5e5da454d740.tar.gz
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;
Diffstat (limited to 'nest')
-rw-r--r--nest/mpls.c4
1 files changed, 3 insertions, 1 deletions
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)