Skip to content

Commit

Permalink
l2tp: Fix sendmsg() return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guillaume Nault authored and David S. Miller committed Jun 13, 2013
1 parent 55b92b7 commit a6f79d0
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 @@ -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);
Expand Down

0 comments on commit a6f79d0

Please sign in to comment.