]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Use the passed in nexthops vrf
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Feb 2018 23:55:10 +0000 (18:55 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Feb 2018 23:55:10 +0000 (18:55 -0500)
When decoding and creating the appropriate data structures
for a nexthop, use the passed in vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/zserv.c

index 98cb54f7b8f9a827fd52f38d35300be094faa43e..bca8a509d82ededda2b0db02be3adb82d6ed9174 100644 (file)
@@ -1166,12 +1166,12 @@ static int zread_route_add(struct zserv *client, u_short length,
                        switch (api_nh->type) {
                        case NEXTHOP_TYPE_IFINDEX:
                                nexthop = route_entry_nexthop_ifindex_add(
-                                       re, api_nh->ifindex, re->vrf_id);
+                                       re, api_nh->ifindex, api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_IPV4:
                                nexthop = route_entry_nexthop_ipv4_add(
                                        re, &api_nh->gate.ipv4, NULL,
-                                       re->vrf_id);
+                                       api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_IPV4_IFINDEX: {
 
@@ -1188,7 +1188,7 @@ static int zread_route_add(struct zserv *client, u_short length,
 
                                nexthop = route_entry_nexthop_ipv4_ifindex_add(
                                        re, &api_nh->gate.ipv4, NULL, ifindex,
-                                       re->vrf_id);
+                                       api_nh->vrf_id);
 
                                /* if this an EVPN route entry,
                                   program the nh as neigh
@@ -1211,12 +1211,12 @@ static int zread_route_add(struct zserv *client, u_short length,
                        }
                        case NEXTHOP_TYPE_IPV6:
                                nexthop = route_entry_nexthop_ipv6_add(
-                                       re, &api_nh->gate.ipv6, re->vrf_id);
+                                       re, &api_nh->gate.ipv6, api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_IPV6_IFINDEX:
                                nexthop = route_entry_nexthop_ipv6_ifindex_add(
                                        re, &api_nh->gate.ipv6, api_nh->ifindex,
-                                       re->vrf_id);
+                                       api_nh->vrf_id);
                                break;
                        case NEXTHOP_TYPE_BLACKHOLE:
                                nexthop = route_entry_nexthop_blackhole_add(