diff options
Diffstat (limited to 'include/rdma/ib_addr.h')
-rw-r--r-- | include/rdma/ib_addr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index 7aca12188ef3..ec5008cf5d51 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -172,7 +172,8 @@ static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid) (struct in6_addr *)gid); break; case AF_INET6: - memcpy(gid->raw, &((struct sockaddr_in6 *)addr)->sin6_addr, 16); + *(struct in6_addr *)&gid->raw = + ((struct sockaddr_in6 *)addr)->sin6_addr; break; default: return -EINVAL; |