aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp/l2tp_ppp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/l2tp/l2tp_ppp.c')
-rw-r--r--net/l2tp/l2tp_ppp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 8ef6b9416cba..286366ef8930 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -1522,8 +1522,8 @@ static int pppol2tp_session_getsockopt(struct sock *sk,
1522 * handler, according to whether the PPPoX socket is a for a regular session 1522 * handler, according to whether the PPPoX socket is a for a regular session
1523 * or the special tunnel type. 1523 * or the special tunnel type.
1524 */ 1524 */
1525static int pppol2tp_getsockopt(struct socket *sock, int level, 1525static int pppol2tp_getsockopt(struct socket *sock, int level, int optname,
1526 int optname, char __user *optval, int __user *optlen) 1526 char __user *optval, int __user *optlen)
1527{ 1527{
1528 struct sock *sk = sock->sk; 1528 struct sock *sk = sock->sk;
1529 struct l2tp_session *session; 1529 struct l2tp_session *session;
@@ -1535,7 +1535,7 @@ static int pppol2tp_getsockopt(struct socket *sock, int level,
1535 if (level != SOL_PPPOL2TP) 1535 if (level != SOL_PPPOL2TP)
1536 return udp_prot.getsockopt(sk, level, optname, optval, optlen); 1536 return udp_prot.getsockopt(sk, level, optname, optval, optlen);
1537 1537
1538 if (get_user(len, (int __user *) optlen)) 1538 if (get_user(len, optlen))
1539 return -EFAULT; 1539 return -EFAULT;
1540 1540
1541 len = min_t(unsigned int, len, sizeof(int)); 1541 len = min_t(unsigned int, len, sizeof(int));
@@ -1568,7 +1568,7 @@ static int pppol2tp_getsockopt(struct socket *sock, int level,
1568 err = pppol2tp_session_getsockopt(sk, session, optname, &val); 1568 err = pppol2tp_session_getsockopt(sk, session, optname, &val);
1569 1569
1570 err = -EFAULT; 1570 err = -EFAULT;
1571 if (put_user(len, (int __user *) optlen)) 1571 if (put_user(len, optlen))
1572 goto end_put_sess; 1572 goto end_put_sess;
1573 1573
1574 if (copy_to_user((void __user *) optval, &val, len)) 1574 if (copy_to_user((void __user *) optval, &val, len))