|
@@ -1636,17 +1636,14 @@ static int
|
|
ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
|
|
ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
|
|
{
|
|
{
|
|
struct msghdr msg = {NULL,};
|
|
struct msghdr msg = {NULL,};
|
|
- struct kvec iov;
|
|
|
|
|
|
+ struct kvec iov = {buffer, buflen};
|
|
int len;
|
|
int len;
|
|
|
|
|
|
EnterFunction(7);
|
|
EnterFunction(7);
|
|
|
|
|
|
/* Receive a packet */
|
|
/* Receive a packet */
|
|
- iov.iov_base = buffer;
|
|
|
|
- iov.iov_len = (size_t)buflen;
|
|
|
|
-
|
|
|
|
- len = kernel_recvmsg(sock, &msg, &iov, 1, buflen, MSG_DONTWAIT);
|
|
|
|
-
|
|
|
|
|
|
+ iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, buflen);
|
|
|
|
+ len = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
|
|
if (len < 0)
|
|
if (len < 0)
|
|
return len;
|
|
return len;
|
|
|
|
|