From: Guillaume Nault <g.nault@alphalink.fr>
To: netdev@vger.kernel.org
Cc: James Chapman <jchapman@katalix.com>, David Miller <davem@davemloft.net>
Subject: [PATCH net,stable 2/2] l2tp: Fix sendmsg() return value
Date: Wed, 12 Jun 2013 16:07:36 +0200 [thread overview]
Message-ID: <20130612140736.GC3500@alphalink.fr> (raw)
In-Reply-To: <cover.1371044671.git.g.nault@alphalink.fr>
PPPoL2TP sockets should comply with the standard send*() return values
(i.e. return number of bytes sent instead of 0 upon success).
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
net/l2tp/l2tp_ppp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 681c626..8dec687 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -358,7 +358,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
sock_put(ps->tunnel_sock);
sock_put(sk);
- return error;
+ return total_len;
error_put_sess_tun:
sock_put(ps->tunnel_sock);
--
1.7.10.4
next prev parent reply other threads:[~2013-06-12 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1371044671.git.g.nault@alphalink.fr>
2013-06-12 14:07 ` [PATCH net,stable 1/2] l2tp: Fix PPP header erasure and memory leak Guillaume Nault
2013-06-12 14:41 ` Eric Dumazet
2013-06-12 14:50 ` Eric Dumazet
2013-06-13 9:39 ` David Miller
2013-06-12 14:07 ` Guillaume Nault [this message]
2013-06-13 9:39 ` [PATCH net,stable 2/2] l2tp: Fix sendmsg() return value David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130612140736.GC3500@alphalink.fr \
--to=g.nault@alphalink.fr \
--cc=davem@davemloft.net \
--cc=jchapman@katalix.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).