Message ID | 20121030201937.GA9583@shrek.podlesie.net |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index 0dcb5dc..df06d14 100644 --- a/net/atm/pppoatm.c +++ b/net/atm/pppoatm.c @@ -414,6 +414,8 @@ static int pppoatm_ioctl(struct socket *sock, unsigned int cmd, return -ENOIOCTLCMD; if (!capable(CAP_NET_ADMIN)) return -EPERM; + if (sock->state != SS_CONNECTED) + return -EINVAL; return pppoatm_assign_vcc(atmvcc, argp); } case PPPIOCGCHAN: