diff options
author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-02-12 21:51:49 +0100 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2019-02-12 22:06:48 +0100 |
commit | d03239d09b084191742497b4b09c25bcf9e9d1b5 (patch) | |
tree | 881e69512bd22447bdaee3bb87f2e2f4445adc33 /bgpd | |
parent | Merge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown (diff) | |
download | frr-d03239d09b084191742497b4b09c25bcf9e9d1b5.tar.xz frr-d03239d09b084191742497b4b09c25bcf9e9d1b5.zip |
bgpd: fill the pmsi_tnl_type into the type-3 PMSI attr
Currently we are hardcoding it at the time of attr building to
ingress-replication. This is just a code clean-up and has no
functional impact.
Ticket: CM-23790
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_attr.c | 2 | ||||
-rw-r--r-- | bgpd/bgp_evpn.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 03f31eddf..3b5261fdf 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -3445,7 +3445,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, PMSI_TNLTYPE_INGR_REPL); // IR (6) + stream_putc(s, attr->pmsi_tnl_type); stream_put(s, &(attr->label), BGP_LABEL_BYTES); // MPLS Label / VXLAN VNI stream_put_ipv4(s, attr->nexthop.s_addr); diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 5a67cc420..bf162b201 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1769,8 +1769,10 @@ static int update_evpn_route(struct bgp *bgp, struct bgpevpn *vpn, ZEBRA_MACIP_TYPE_ROUTER_FLAG) ? 1 : 0; /* PMSI is only needed for type-3 routes */ - if (p->prefix.route_type == BGP_EVPN_IMET_ROUTE) + if (p->prefix.route_type == BGP_EVPN_IMET_ROUTE) { attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_PMSI_TUNNEL); + attr.pmsi_tnl_type = PMSI_TNLTYPE_INGR_REPL; + } /* router mac is only needed for type-2 routes here. */ if (p->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE) |