diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-21 02:14:51 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-12-03 02:38:08 +0100 |
commit | 7edffd25be336ecc9e82d36ef53f5c9ab552e01f (patch) | |
tree | 4d39f163b41979cfd318857caef3e4b636edbebe /net | |
parent | mISDN: switch to sock_recvmsg() (diff) | |
download | linux-7edffd25be336ecc9e82d36ef53f5c9ab552e01f.tar.xz linux-7edffd25be336ecc9e82d36ef53f5c9ab552e01f.zip |
ipvs: switch to sock_recvmsg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sync.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c index 9ee71cb276d7..fbaf3bd05b2e 100644 --- a/net/netfilter/ipvs/ip_vs_sync.c +++ b/net/netfilter/ipvs/ip_vs_sync.c @@ -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; |