Commit 3b1a9145 authored by Krzysztof Mazur's avatar Krzysztof Mazur Committed by David Woodhouse

pppoatm: allow assign only on a connected socket

The pppoatm does not check if used vcc is in connected state,
causing an Oops in pppoatm_send() when vcc->send() is called
on not fully connected socket.

Now pppoatm can be assigned only on connected sockets; otherwise
-EINVAL error is returned.
Signed-off-by: default avatarKrzysztof Mazur <>
Cc: Chas Williams - CONTRACTOR <>
Signed-off-by: default avatarDavid Woodhouse <>
parent ec809bd8
......@@ -406,6 +406,8 @@ static int pppoatm_ioctl(struct socket *sock, unsigned int cmd,
if (!capable(CAP_NET_ADMIN))
return -EPERM;
if (sock->state != SS_CONNECTED)
return -EINVAL;
return pppoatm_assign_vcc(atmvcc, argp);
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