On Mon, Jul 16, 2018 at 06:24:19PM +0000, Thiruvazhiyan Lakshmanan wrote: > Hi,
> We are looking for using BIRD in our VM for BGP 3107 functionality with > 6PE support. Basically BIRD should peer with peering router with > ipv6-label-unicast family and advertise its v6 loopback address with the > label value of 2 (Explicit null label) and the next-hop of the route to > be set to its v4 loopback address. Does BIRD support this currently? Hi Sorry for late answer. It is not supported currently, but you can do that with attached unofficial patch. The patch will cause to use existing MPLS next-hop label stack even if IP next hop is reset to local address during BGP export. So you can define static route with MPLS stack and announce it. Perhaps you would also need to add static MPLS rules to decapsulate incoming labeled traffic. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index c40b8ec2..1d757a9b 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -870,6 +870,7 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to) } else { + rta *ra = s->route->attrs; ip_addr nh[2] = { s->channel->next_hop_addr, s->channel->link_addr }; bgp_set_attr_data(to, s->pool, BA_NEXT_HOP, 0, nh, ipa_nonzero(nh[1]) ? 32 : 16); @@ -877,7 +878,9 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to) 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 *labels = ra->nh.labels ? ra->nh.label : &implicit_null; + uint lnum = ra->nh.labels ? ra->nh.labels : 1; + bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, labels, lnum * 4); } } }