From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [PATCH] Plip ioctl bug Date: Fri, 11 Jun 2004 19:27:50 -0400 Sender: netdev-bounce@oss.sgi.com Message-ID: <40CA3FF6.1020408@pobox.com> References: <20040611231154.GA21485@bougret.hpl.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@oss.sgi.com, Nimrod Zimerman , Niibe Yutaka Return-path: To: jt@hpl.hp.com In-Reply-To: <20040611231154.GA21485@bougret.hpl.hp.com> Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Jean Tourrilhes wrote: > Hi all, > > Plip should verify that it got the proper ioctl to avoid false > positive. User reported that plip suddenly was gaining wireless > capability ;-) > Have fun... > > Jean > > Signed-off-by: $me > ------------------------------------------ > > diff -u -p linux/drivers/net/plip.b0.c linux/drivers/net/plip.c > --- linux/drivers/net/plip.b0.c Fri Jun 11 16:00:13 2004 > +++ linux/drivers/net/plip.c Fri Jun 11 16:03:14 2004 > @@ -1219,6 +1219,11 @@ plip_ioctl(struct net_device *dev, struc > struct net_local *nl = netdev_priv(dev); > struct plipconf *pc = (struct plipconf *) &rq->ifr_data; > > + /* Respond only to our IOCTL, ignore other IOCTLs, such as > + * Ethtool and Wireless Extensions. Jean II */ > + if(cmd != SIOCDEVPLIP) > + return -EOPNOTSUPP; > + > switch(pc->pcmd) { > case PLIP_GET_TIMEOUT: > pc->trigger = nl->trigger; already in the latest 2.6.x :)