Skip to content

Commit

Permalink
ipvs: switch to sock_recvmsg()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 3, 2017
1 parent 956a27e commit 7edffd2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/netfilter/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,17 +1636,14 @@ static int
ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen)
{
struct msghdr msg = {NULL,};
struct kvec iov;
struct kvec iov = {buffer, buflen};
int len;

EnterFunction(7);

/* 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)
return len;

Expand Down

0 comments on commit 7edffd2

Please sign in to comment.