diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2017-04-06 19:31:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-08 18:29:04 +0300 |
commit | 364700cf8fd54f54ad08313464105a414e3bccb7 (patch) | |
tree | 6effdb79001ec4069af6f3301fda22d465b9280e /net/l2tp | |
parent | cc663f4d4c97b7297fb45135ab23cfd508b35a77 (diff) | |
download | linux-364700cf8fd54f54ad08313464105a414e3bccb7.tar.xz |
l2tp: don't mask errors in pppol2tp_setsockopt()
pppol2tp_setsockopt() unconditionally overwrites the error value
returned by pppol2tp_tunnel_setsockopt() or
pppol2tp_session_setsockopt(), thus hiding errors from userspace.
Fixes: fd558d186df2 ("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>
Diffstat (limited to 'net/l2tp')
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index 861b255a2d51..973a9185b276 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c @@ -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: |