diff options
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index de45cae0..9387ddba 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -17,6 +17,7 @@ #include "nest/protocol.h" #include "nest/route.h" #include "nest/attrs.h" +#include "nest/mpls.h" #include "conf/conf.h" #include "lib/resource.h" #include "lib/string.h" @@ -1501,6 +1502,13 @@ bgp_finish_attrs(struct bgp_parse_state *s, rta *a) p->cf->local_role == BGP_ROLE_RS_CLIENT)) bgp_set_attr_u32(&a->eattrs, s->pool, BA_ONLY_TO_CUSTOMER, 0, p->cf->remote_as); } + + /* Apply MPLS policy for labeled SAFIs */ + if (s->mpls && s->proto->p.mpls_channel) + { + struct mpls_channel *mc = (void *) s->proto->p.mpls_channel; + ea_set_attr_u32(&a->eattrs, s->pool, EA_MPLS_POLICY, 0, EAF_TYPE_INT, mc->label_policy); + } } |