net: pppolac/pppopns: Add back the msg_flags
authorSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Fri, 28 Apr 2017 18:53:04 +0000 (12:53 -0600)
committerAmit Pundir <amit.pundir@linaro.org>
Thu, 25 May 2017 11:07:25 +0000 (16:37 +0530)
Commit 26fc40a09221330 ("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: 26fc40a09221330 ("net: pppolac/pppopns: Replace msg.msg_iov with
iov_iter_kvec()")
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
drivers/net/ppp/pppolac.c
drivers/net/ppp/pppopns.c

index 0184c96579e9847b5aadefaf9c13c3444d2e2b97..3a45cf80528882c4b8dce6d9d61075fc33b873c4 100644 (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);
index d9e06039794e510ae0674480c32971d97d452d34..cdb4fa1af7346cddc36070034e4df9da0a904e7e 100644 (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);