From: Subash Abhinov Kasiviswanathan Date: Fri, 28 Apr 2017 18:53:04 +0000 (-0600) Subject: net: pppolac/pppopns: Add back the msg_flags X-Git-Tag: release-20171130_firefly~4^2~100^2~119 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9fccb20ef7db320eb43dcd77bd1bf7b16a8e581e;p=firefly-linux-kernel-4.4.55.git net: pppolac/pppopns: Add back the msg_flags 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 --- diff --git a/drivers/net/ppp/pppolac.c b/drivers/net/ppp/pppolac.c index 0184c96579e9..3a45cf805288 100644 --- a/drivers/net/ppp/pppolac.c +++ b/drivers/net/ppp/pppolac.c @@ -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); diff --git a/drivers/net/ppp/pppopns.c b/drivers/net/ppp/pppopns.c index d9e06039794e..cdb4fa1af734 100644 --- a/drivers/net/ppp/pppopns.c +++ b/drivers/net/ppp/pppopns.c @@ -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);