net: pppolac/pppopns: Add back the msg_flags

Commit 26fc40a092 ("net: pppolac/pppopns: Replace msg.msg_iov
with iov_iter_kvec()") removed the msg_flags when removing the
iov fields. This lead to problems with VPN data transfers.

Change-Id: Ib86ab3f927c5cf36cbad0bab501575999dc2b084
Fixes: 26fc40a092 ("net: pppolac/pppopns: Replace msg.msg_iov with
iov_iter_kvec()")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
This commit is contained in:
Subash Abhinov Kasiviswanathan 2017-04-28 12:53:04 -06:00 committed by Dmitry Shmidt
parent e4528dd775
commit 1f48a715af
2 changed files with 6 additions and 2 deletions

View file

@ -206,7 +206,9 @@ static void pppolac_xmit_core(struct work_struct *delivery_work)
while ((skb = skb_dequeue(&delivery_queue))) {
struct sock *sk_udp = skb->sk;
struct kvec iov = {.iov_base = skb->data, .iov_len = skb->len};
struct msghdr msg = { 0 };
struct msghdr msg = {
.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT,
};
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iov, 1,
skb->len);

View file

@ -189,7 +189,9 @@ static void pppopns_xmit_core(struct work_struct *delivery_work)
while ((skb = skb_dequeue(&delivery_queue))) {
struct sock *sk_raw = skb->sk;
struct kvec iov = {.iov_base = skb->data, .iov_len = skb->len};
struct msghdr msg = { 0 };
struct msghdr msg = {
.msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT,
};
iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iov, 1,
skb->len);