diff options
| author | mitesh <mitesh@cumulusnetworks.com> | 2017-10-11 01:32:54 -0700 |
|---|---|---|
| committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-12-14 10:57:05 -0800 |
| commit | d3135ba31d46262e4bd9deaa65e62366cc65a033 (patch) | |
| tree | c69315a89a17150d5fe6929e80a9dab9693bc582 /zebra/zserv.c | |
| parent | 10ebe1ab5417af8760a05fb2edd3306847f7e4ba (diff) | |
bgpd: program mac-ip routes in matching vrfs
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index 4352b78e83..d82ccb93d7 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -1149,6 +1149,7 @@ static int zread_route_add(struct zserv *client, u_short length, if (CHECK_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP)) { for (i = 0; i < api.nexthop_num; i++) { api_nh = &api.nexthops[i]; + ifindex_t ifindex = 0; switch (api_nh->type) { case NEXTHOP_TYPE_IFINDEX: @@ -1160,9 +1161,16 @@ static int zread_route_add(struct zserv *client, u_short length, re, &api_nh->gate.ipv4, NULL); break; case NEXTHOP_TYPE_IPV4_IFINDEX: + if (CHECK_FLAG(api.flags, + ZEBRA_FLAG_EVPN_TYPE2_ROUTE)) { + ifindex = + get_l3vni_svi_ifindex(zvrf_id(zvrf)); + } else { + ifindex = api_nh->ifindex; + } nexthop = route_entry_nexthop_ipv4_ifindex_add( re, &api_nh->gate.ipv4, NULL, - api_nh->ifindex); + ifindex); break; case NEXTHOP_TYPE_IPV6: nexthop = route_entry_nexthop_ipv6_add( |
