static inline void bgp_attr_set_pmsi_tnl_type(struct attr *attr,
enum pta_type pmsi_tnl_type)
{
- attr->pmsi_tnl_type = pmsi_tnl_type;
+ if (!attr->extra)
+ attr->extra = bgp_attr_extra_alloc();
+
+ attr->extra->pmsi_tnl_type = pmsi_tnl_type;
}
+static inline struct ecommunity *
+bgp_attr_get_ecommunity(const struct attr *attr)
+{
+ return attr->ecommunity;
+}
+
+static inline void bgp_attr_set_ecommunity(struct attr *attr,
+ struct ecommunity *ecomm)
+{
+ attr->ecommunity = ecomm;
+}
+
static inline struct ecommunity *
bgp_attr_get_ipv6_ecommunity(const struct attr *attr)
{