diff options
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r-- | proto/bgp/packets.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index 054e6c3c..b7df5a7a 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -1217,11 +1217,10 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to) bgp_set_attr_data(to, s->pool, BA_NEXT_HOP, 0, nh, ipa_nonzero(nh[1]) ? 32 : 16); s->local_next_hop = 1; - /* TODO: Use local MPLS assigned label */ if (s->mpls) { - u32 implicit_null = BGP_MPLS_NULL; - bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, &implicit_null, 4); + u32 label = ea_get_int(s->route->attrs->eattrs, EA_MPLS_LABEL, BGP_MPLS_NULL); + bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, &label, 4); } else bgp_unset_attr(to, s->pool, BA_MPLS_LABEL_STACK); |