Skip to content

Commit

Permalink
l2tp: don't mask errors in pppol2tp_setsockopt()
Browse files Browse the repository at this point in the history
pppol2tp_setsockopt() unconditionally overwrites the error value
returned by pppol2tp_tunnel_setsockopt() or
pppol2tp_session_setsockopt(), thus hiding errors from userspace.

Fixes: fd558d1 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
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 Apr 8, 2017
1 parent cc663f4 commit 364700c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1383,8 +1383,6 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname,
} else
err = pppol2tp_session_setsockopt(sk, session, optname, val);

err = 0;

end_put_sess:
sock_put(sk);
end:
Expand Down

0 comments on commit 364700c

Please sign in to comment.