]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Use next hop's VRF for EVPN-based routes
authorvivek <vivek@cumulusnetworks.com>
Fri, 1 Mar 2019 07:10:53 +0000 (07:10 +0000)
committervivek <vivek@cumulusnetworks.com>
Fri, 1 Mar 2019 07:10:53 +0000 (07:10 +0000)
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>
zebra/zapi_msg.c

index 9b91289decb20f34c8d4a9005f721c1b75f0f9fc..ef9917d4e65533c384ea87ca30ad87099bd7558b 100644 (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: