summaryrefslogtreecommitdiff
path: root/proto/static/static.c
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-08-09 14:47:51 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-12-22 21:38:33 +0100
commitd47c3d64b2733baea756f1bb37ef09f10d7f9644 (patch)
tree8812e0275fb076e0a0b3cf53b876b651ca29e7d7 /proto/static/static.c
parentd14f8c3c45f7e33a7e54ebc0d45bdb0295d70301 (diff)
MPLS: Label stack concatenation for recursive routes
Diffstat (limited to 'proto/static/static.c')
-rw-r--r--proto/static/static.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/static/static.c b/proto/static/static.c
index 878248c1..3e03708c 100644
--- a/proto/static/static.c
+++ b/proto/static/static.c
@@ -128,7 +128,11 @@ drop:
r->state |= STS_INSTALLED;
if (r->dest == RTDX_RECURSIVE)
- rta_set_recursive_next_hop(p->main_channel->table, ap, p_igp_table(p), r->via, IPA_NONE);
+ {
+ ap->nh.labels_append = ap->nh.labels = r->label_count;
+ memcpy(ap->nh.label, r->label_stack, r->label_count * sizeof(u32));
+ rta_set_recursive_next_hop(p->main_channel->table, ap, p_igp_table(p), r->via, IPA_NONE);
+ }
/* We skip rta_lookup() here */