Commit 9639838a authored by Guillaume Nault's avatar Guillaume Nault Committed by Ben Hutchings

l2tp: don't mask errors in pppol2tp_setsockopt()

commit 364700cf upstream.

pppol2tp_setsockopt() unconditionally overwrites the error value
returned by pppol2tp_tunnel_setsockopt() or
pppol2tp_session_setsockopt(), thus hiding errors from userspace.

Fixes: fd558d18 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: default avatarGuillaume Nault <g.nault@alphalink.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 4ceafa33
...@@ -1402,8 +1402,6 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname, ...@@ -1402,8 +1402,6 @@ static int pppol2tp_setsockopt(struct socket *sock, int level, int optname,
} else } else
err = pppol2tp_session_setsockopt(sk, session, optname, val); err = pppol2tp_session_setsockopt(sk, session, optname, val);
err = 0;
end_put_sess: end_put_sess:
sock_put(sk); sock_put(sk);
end: end:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment