diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/core/addr.c | 18 | ||||
-rw-r--r-- | drivers/net/cnic.c | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 3c2b309ab891..e0ef5fdc361e 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -231,28 +231,28 @@ static int addr6_resolve(struct sockaddr_in6 *src_in, | |||
231 | struct sockaddr_in6 *dst_in, | 231 | struct sockaddr_in6 *dst_in, |
232 | struct rdma_dev_addr *addr) | 232 | struct rdma_dev_addr *addr) |
233 | { | 233 | { |
234 | struct flowi fl; | 234 | struct flowi6 fl6; |
235 | struct neighbour *neigh; | 235 | struct neighbour *neigh; |
236 | struct dst_entry *dst; | 236 | struct dst_entry *dst; |
237 | int ret; | 237 | int ret; |
238 | 238 | ||
239 | memset(&fl, 0, sizeof fl); | 239 | memset(&fl6, 0, sizeof fl6); |
240 | ipv6_addr_copy(&fl.fl6_dst, &dst_in->sin6_addr); | 240 | ipv6_addr_copy(&fl6.daddr, &dst_in->sin6_addr); |
241 | ipv6_addr_copy(&fl.fl6_src, &src_in->sin6_addr); | 241 | ipv6_addr_copy(&fl6.saddr, &src_in->sin6_addr); |
242 | fl.flowi_oif = addr->bound_dev_if; | 242 | fl6.flowi6_oif = addr->bound_dev_if; |
243 | 243 | ||
244 | dst = ip6_route_output(&init_net, NULL, &fl); | 244 | dst = ip6_route_output(&init_net, NULL, &fl6); |
245 | if ((ret = dst->error)) | 245 | if ((ret = dst->error)) |
246 | goto put; | 246 | goto put; |
247 | 247 | ||
248 | if (ipv6_addr_any(&fl.fl6_src)) { | 248 | if (ipv6_addr_any(&fl6.saddr)) { |
249 | ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev, | 249 | ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev, |
250 | &fl.fl6_dst, 0, &fl.fl6_src); | 250 | &fl6.daddr, 0, &fl6.saddr); |
251 | if (ret) | 251 | if (ret) |
252 | goto put; | 252 | goto put; |
253 | 253 | ||
254 | src_in->sin6_family = AF_INET6; | 254 | src_in->sin6_family = AF_INET6; |
255 | ipv6_addr_copy(&src_in->sin6_addr, &fl.fl6_src); | 255 | ipv6_addr_copy(&src_in->sin6_addr, &fl6.saddr); |
256 | } | 256 | } |
257 | 257 | ||
258 | if (dst->dev->flags & IFF_LOOPBACK) { | 258 | if (dst->dev->flags & IFF_LOOPBACK) { |
diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c index c8922f69705e..8cca60e43444 100644 --- a/drivers/net/cnic.c +++ b/drivers/net/cnic.c | |||
@@ -3424,14 +3424,14 @@ static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr, | |||
3424 | struct dst_entry **dst) | 3424 | struct dst_entry **dst) |
3425 | { | 3425 | { |
3426 | #if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) | 3426 | #if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE)) |
3427 | struct flowi fl; | 3427 | struct flowi6 fl6; |
3428 | 3428 | ||
3429 | memset(&fl, 0, sizeof(fl)); | 3429 | memset(&fl6, 0, sizeof(fl6)); |
3430 | ipv6_addr_copy(&fl.fl6_dst, &dst_addr->sin6_addr); | 3430 | ipv6_addr_copy(&fl6.daddr, &dst_addr->sin6_addr); |
3431 | if (ipv6_addr_type(&fl.fl6_dst) & IPV6_ADDR_LINKLOCAL) | 3431 | if (ipv6_addr_type(&fl6.daddr) & IPV6_ADDR_LINKLOCAL) |
3432 | fl.flowi_oif = dst_addr->sin6_scope_id; | 3432 | fl6.flowi6_oif = dst_addr->sin6_scope_id; |
3433 | 3433 | ||
3434 | *dst = ip6_route_output(&init_net, NULL, &fl); | 3434 | *dst = ip6_route_output(&init_net, NULL, &fl6); |
3435 | if (*dst) | 3435 | if (*dst) |
3436 | return 0; | 3436 | return 0; |
3437 | #endif | 3437 | #endif |