diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-07-01 01:03:16 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-07-01 01:03:16 +0200 |
commit | 8e86ffce8251f4e48f61b6d8e89966d037ef8e59 (patch) | |
tree | 733d40582337e08a6bb35f8562a7337de999708d | |
parent | 93c1defdb03729ae8b41752d2155dff65964df5b (diff) |
BGP: Use implicit-NULL label when announcing MPLS routes with local next-hop
We currently cannot assing local labels, but we can still be LSP egress
router. Therefore when we announce labeled route with local next-hop, we
should announce implicit-NULL label instead of rejecting it completely.
-rw-r--r-- | proto/bgp/packets.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index d67ef0b2..c40b8ec2 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -875,7 +875,10 @@ bgp_update_next_hop_ip(struct bgp_export_state *s, eattr *a, ea_list **to) /* TODO: Use local MPLS assigned label */ if (s->mpls) - bgp_unset_attr(to, s->pool, BA_MPLS_LABEL_STACK); + { + u32 implicit_null = BGP_MPLS_NULL; + bgp_set_attr_data(to, s->pool, BA_MPLS_LABEL_STACK, 0, &implicit_null, 4); + } } } |