diff options
| author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-30 11:43:25 +0100 |
|---|---|---|
| committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-30 11:43:25 +0100 |
| commit | dab8b7a81c42c62a3effbcf157ff6a125871792c (patch) | |
| tree | b6d84054818466bd1ba72ad401272e668cb6b07d /bgpd/rfapi/vnc_zebra.c | |
| parent | c97dbe20a19a43dce7a1cb37cf96b2b3d66d77ca (diff) | |
| parent | 15fa114fedcdb94f1de8d18b84bba6e16007e74b (diff) | |
Merge remote-tracking 'frr/master' into SR-Routing
Diffstat (limited to 'bgpd/rfapi/vnc_zebra.c')
| -rw-r--r-- | bgpd/rfapi/vnc_zebra.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bgpd/rfapi/vnc_zebra.c b/bgpd/rfapi/vnc_zebra.c index f8b38468f5..92d7e6fc76 100644 --- a/bgpd/rfapi/vnc_zebra.c +++ b/bgpd/rfapi/vnc_zebra.c @@ -385,6 +385,8 @@ static void vnc_zebra_route_msg(struct prefix *p, unsigned int nhp_count, struct zapi_route api; struct zapi_nexthop *api_nh; int i; + struct in_addr **nhp_ary4 = nhp_ary; + struct in6_addr **nhp_ary6 = nhp_ary; if (!nhp_count) { vnc_zlog_debug_verbose("%s: empty nexthop list, skipping", @@ -394,6 +396,7 @@ static void vnc_zebra_route_msg(struct prefix *p, unsigned int nhp_count, memset(&api, 0, sizeof(api)); api.vrf_id = VRF_DEFAULT; + api.nh_vrf_id = VRF_DEFAULT; api.type = ZEBRA_ROUTE_VNC; api.safi = SAFI_UNICAST; api.prefix = *p; @@ -402,20 +405,16 @@ static void vnc_zebra_route_msg(struct prefix *p, unsigned int nhp_count, SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); api.nexthop_num = MIN(nhp_count, multipath_num); for (i = 0; i < api.nexthop_num; i++) { - struct in_addr *nhp_ary4; - struct in6_addr *nhp_ary6; api_nh = &api.nexthops[i]; switch (p->family) { case AF_INET: - nhp_ary4 = nhp_ary; - memcpy(&api_nh->gate.ipv4, &nhp_ary4[i], + memcpy(&api_nh->gate.ipv4, nhp_ary4[i], sizeof(api_nh->gate.ipv4)); api_nh->type = NEXTHOP_TYPE_IPV4; break; case AF_INET6: - nhp_ary6 = nhp_ary; - memcpy(&api_nh->gate.ipv6, &nhp_ary6[i], + memcpy(&api_nh->gate.ipv6, nhp_ary6[i], sizeof(api_nh->gate.ipv6)); api_nh->type = NEXTHOP_TYPE_IPV6; break; |
