From be0cb2568b0a6eec37b2ba7ad639e6f243e711d2 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Wed, 2 Jun 2004 07:48:29 -0400 Subject: [PATCH] [PATCH] Check cmd in plip_ioctl I received a bug report that a PLIP interface was incorrectly identified as wireless because plip_ioctl did not check what the value of cmd is before processing the request. This patch fixes exactly that. --- drivers/net/plip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 4b8256c64ce31..31bbff4f0f355 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c @@ -1219,6 +1219,9 @@ plip_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) struct net_local *nl = netdev_priv(dev); struct plipconf *pc = (struct plipconf *) &rq->ifr_data; + if (cmd != SIOCDEVPLIP) + return -EOPNOTSUPP; + switch(pc->pcmd) { case PLIP_GET_TIMEOUT: pc->trigger = nl->trigger; -- 2.53.0