zebra: Use next hop's VRF for EVPN-based routes

Ensure that the next hop's VRF is used for IPv4 and IPv6 unicast routes
sourced from EVPN routes, for next hop and Router MAC tracking and
install. This way, leaked routes from other instances are handled properly.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
vivek 2019-03-01 07:10:53 +00:00
parent 9544ddb288
commit 744c63be13

View File

@ -1463,8 +1463,8 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
&(api_nh->gate.ipv4),
sizeof(struct in_addr));
zebra_vxlan_evpn_vrf_route_add(
vrf_id, &api_nh->rmac, &vtep_ip,
&api.prefix);
api_nh->vrf_id, &api_nh->rmac,
&vtep_ip, &api.prefix);
}
break;
case NEXTHOP_TYPE_IPV6:
@ -1493,8 +1493,8 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
memcpy(&vtep_ip.ipaddr_v6, &(api_nh->gate.ipv6),
sizeof(struct in6_addr));
zebra_vxlan_evpn_vrf_route_add(
vrf_id, &api_nh->rmac, &vtep_ip,
&api.prefix);
api_nh->vrf_id, &api_nh->rmac,
&vtep_ip, &api.prefix);
}
break;
case NEXTHOP_TYPE_BLACKHOLE: