Skip to content

Commit

Permalink
bgpd: fill the pmsi_tnl_type into the type-3 PMSI attr
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
AnuradhaKaruppiah authored and donaldsharp committed Feb 19, 2019
1 parent 1f4e307 commit e1a5abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bgpd/bgp_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e1a5abe

Please sign in to comment.