Skip to content

Commit

Permalink
l2tp: Fix sendmsg() return value
Browse files Browse the repository at this point in the history
[ Upstream commit a6f79d0 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Guillaume Nault authored and Greg Kroah-Hartman committed Jun 27, 2013
1 parent 6e09261 commit 60ab783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,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);
Expand Down

0 comments on commit 60ab783

Please sign in to comment.