a->nh.labels = MIN(ms->u.ptr->length / 4, MPLS_MAX_LABEL_STACK);
memcpy(a->nh.label, ms->u.ptr->data, a->nh.labels * 4);
+ /* Hack to handle src_vni in bridge code */
+ ea_set_attr_u32(&a->eattrs, tmp_linpool, EA_MPLS_LABEL, 0, EAF_TYPE_INT, p->vni);
+
rte *e = rte_get_temp(a, p->p.main_source);
rte_update2(c, n, e, p->p.main_source);
}
a->nh.labels = 1;
a->nh.label[0] = bgp_pmsi_get_label(pt->u.ptr);
+ /* Hack to handle src_vni in bridge code */
+ ea_set_attr_u32(&a->eattrs, tmp_linpool, EA_MPLS_LABEL, 0, EAF_TYPE_INT, p->vni);
+
rte *e = rte_get_temp(a, s);
rte_update2(c, n, e, s);
}
if (nh->labels)
nl_add_attr_u32(&r->h, rsize, NDA_VNI, nh->label[0]);
+ eattr *ea = ea_find(e->attrs->eattrs, EA_MPLS_LABEL);
+ if (ea)
+ nl_add_attr_u32(&r->h, rsize, NDA_SRC_VNI, ea->u.data);
+
r->n.ndm_state |= NUD_PERMANENT;
}