@@ -390,14 +390,17 @@ static int addr_resolve_local(struct soc
case AF_INET6:
{
struct in6_addr *a;
+ int found = 0;
for_each_netdev(&init_net, dev)
if (ipv6_chk_addr(&init_net,
&((struct sockaddr_in6 *) dst_in)->sin6_addr,
- dev, 1))
+ dev, 1)){
+ found = 1;
break;
+ }
- if (!dev)
+ if (!found)
return -EADDRNOTAVAIL;
a = &((struct sockaddr_in6 *) src_in)->sin6_addr;
@@ -406,6 +409,8 @@ static int addr_resolve_local(struct soc
src_in->sa_family = dst_in->sa_family;
((struct sockaddr_in6 *) src_in)->sin6_addr =
((struct sockaddr_in6 *) dst_in)->sin6_addr;
+ ((struct sockaddr_in6 *) src_in)->sin6_scope_id =
+ ((struct sockaddr_in6 *) dst_in)->sin6_scope_id;
ret = rdma_copy_addr(addr, dev, dev->dev_addr);
} else if (ipv6_addr_loopback(a)) {
ret = rdma_translate_ip(dst_in, addr);