@@ -140,7 +140,8 @@ struct socket *
BUILD_BUG_ON(sizeof(cr) > 16); /* too big to be on the stack */
- LASSERT(peeraddr->sa_family == AF_INET);
+ LASSERT(peeraddr->sa_family == AF_INET ||
+ peeraddr->sa_family == AF_INET6);
for (port = LNET_ACCEPTOR_MAX_RESERVED_PORT;
port >= LNET_ACCEPTOR_MIN_RESERVED_PORT;
@@ -380,7 +380,7 @@ struct socket *
if (IS_ERR(sock))
return sock;
- rc = kernel_connect(sock, peeraddr, sizeof(struct sockaddr_in), 0);
+ rc = kernel_connect(sock, peeraddr, sizeof(struct sockaddr_in6), 0);
if (!rc)
return sock;