diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-20 20:14:51 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-12-02 20:38:08 -0500 |
commit | 7edffd25be336ecc9e82d36ef53f5c9ab552e01f (patch) | |
tree | 4d39f163b41979cfd318857caef3e4b636edbebe | |
parent | 956a27ecfad51048c7614ec256c638f166bd8db3 (diff) |
ipvs: switch to sock_recvmsg()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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 | |||
1636 | ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen) | 1636 | ip_vs_receive(struct socket *sock, char *buffer, const size_t buflen) |
1637 | { | 1637 | { |
1638 | struct msghdr msg = {NULL,}; | 1638 | struct msghdr msg = {NULL,}; |
1639 | struct kvec iov; | 1639 | struct kvec iov = {buffer, buflen}; |
1640 | int len; | 1640 | int len; |
1641 | 1641 | ||
1642 | EnterFunction(7); | 1642 | EnterFunction(7); |
1643 | 1643 | ||
1644 | /* Receive a packet */ | 1644 | /* Receive a packet */ |
1645 | iov.iov_base = buffer; | 1645 | iov_iter_kvec(&msg.msg_iter, READ | ITER_KVEC, &iov, 1, buflen); |
1646 | iov.iov_len = (size_t)buflen; | 1646 | len = sock_recvmsg(sock, &msg, MSG_DONTWAIT); |
1647 | |||
1648 | len = kernel_recvmsg(sock, &msg, &iov, 1, buflen, MSG_DONTWAIT); | ||
1649 | |||
1650 | if (len < 0) | 1647 | if (len < 0) |
1651 | return len; | 1648 | return len; |
1652 | 1649 | ||