summaryrefslogtreecommitdiff
path: root/bgpd/bgp_attr.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-11-02 10:52:40 -0500
committerDonald Sharp <sharpd@nvidia.com>2020-11-15 09:44:47 -0500
commit2a3f51cf6ba298ab42b7b51a2d879b46baa2ee31 (patch)
tree02cc2648c61ab31a0a80d4c2dbc994807f6103b5 /bgpd/bgp_attr.c
parentdf7d4670ea9dd8aa35457abeb5827e074cca7514 (diff)
bgpd: Add accessor for bgp_attr.pmsi_tnl_type
Add an accessor for the bgp_attr.pmsi_tnl_type to allow us to abstract where it is. Every attribute is paying the price of this bit of data as part of `struct bgp_attr` In the future we'll move it elsewhere. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_attr.c')
-rw-r--r--bgpd/bgp_attr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index a804968605..ab1173ba8d 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -2785,7 +2785,7 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
}
attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL);
- attr->pmsi_tnl_type = tnl_type;
+ bgp_attr_set_pmsi_tnl_type(attr, tnl_type);
stream_get(&attr->label, peer->curr, BGP_LABEL_BYTES);
/* Forward read pointer of input stream. */
@@ -4110,7 +4110,7 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
stream_putc(s, BGP_ATTR_PMSI_TUNNEL);
stream_putc(s, 9); // Length
stream_putc(s, 0); // Flags
- stream_putc(s, attr->pmsi_tnl_type);
+ stream_putc(s, bgp_attr_get_pmsi_tnl_type(attr));
stream_put(s, &(attr->label),
BGP_LABEL_BYTES); // MPLS Label / VXLAN VNI
stream_put_ipv4(s, attr->nexthop.s_addr);