瀏覽代碼

l2tp: Fix sendmsg() return value

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>
Guillaume Nault 12 年之前
父節點
當前提交
a6f79d0f26
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/l2tp/l2tp_ppp.c

+ 1 - 1
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(ps->tunnel_sock);
 	sock_put(sk);
 	sock_put(sk);
 
 
-	return error;
+	return total_len;
 
 
 error_put_sess_tun:
 error_put_sess_tun:
 	sock_put(ps->tunnel_sock);
 	sock_put(ps->tunnel_sock);