summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-05 19:28:56 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-05 19:28:56 +0200
commitf2e725a76882ba6b75c3ce4fb3c760bd83462410 (patch)
tree48883d91d8cdfaba9420efe33e1b81778e70b0a8 /nest/rt-attr.c
parent1c30b689ddd032ef8000fb7836348a48ba3184ff (diff)
All outstanding MPLS label stacks are stored as adata
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 39fd7db4..dc4fe785 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -108,6 +108,12 @@ struct ea_class ea_gen_source = {
.format = ea_gen_source_format,
};
+struct ea_class ea_mpls_labels = {
+ .name = "mpls_labels",
+ .type = T_CLIST,
+ .readonly = 1,
+};
+
const char * rta_dest_names[RTD_MAX] = {
[RTD_NONE] = "",
[RTD_UNICAST] = "unicast",
@@ -220,7 +226,7 @@ nexthop__same(struct nexthop *x, struct nexthop *y)
{
if (!ipa_equal(x->gw, y->gw) || (x->iface != y->iface) ||
(x->flags != y->flags) || (x->weight != y->weight) ||
- (x->labels_orig != y->labels_orig) || (x->labels != y->labels))
+ (x->labels != y->labels))
return 0;
for (int i = 0; i < x->labels; i++)
@@ -402,7 +408,6 @@ nexthop_copy(struct nexthop *o)
n->next = NULL;
n->flags = o->flags;
n->weight = o->weight;
- n->labels_orig = o->labels_orig;
n->labels = o->labels;
for (int i=0; i<o->labels; i++)
n->label[i] = o->label[i];
@@ -1484,6 +1489,8 @@ rta_init(void)
ea_register_init(&ea_gen_igp_metric);
ea_register_init(&ea_gen_from);
ea_register_init(&ea_gen_source);
+
+ ea_register_init(&ea_mpls_labels);
}
/*