mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
MPLS: Label stack concatenation for recursive routes
This commit is contained in:
@@ -105,7 +105,12 @@ stat_route:
|
||||
this_srt->dest = RTDX_RECURSIVE;
|
||||
this_srt->via = $3;
|
||||
}
|
||||
|
||||
| stat_route0 RECURSIVE ipa MPLS label_stack {
|
||||
this_srt->dest = RTDX_RECURSIVE;
|
||||
this_srt->via = $3;
|
||||
this_srt->label_count = $5[0];
|
||||
this_srt->label_stack = &($5[1]);
|
||||
}
|
||||
| stat_route0 DROP { this_srt->dest = RTD_BLACKHOLE; }
|
||||
| stat_route0 REJECT { this_srt->dest = RTD_UNREACHABLE; }
|
||||
| stat_route0 BLACKHOLE { this_srt->dest = RTD_BLACKHOLE; }
|
||||
|
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user