netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Plip ioctl bug
@ 2004-06-11 23:11 Jean Tourrilhes
  2004-06-11 23:27 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Tourrilhes @ 2004-06-11 23:11 UTC (permalink / raw)
  To: netdev, Jeff Garzik, Nimrod Zimerman, Niibe Yutaka

	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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Plip ioctl bug
  2004-06-11 23:11 [PATCH] Plip ioctl bug Jean Tourrilhes
@ 2004-06-11 23:27 ` Jeff Garzik
  2004-06-11 23:40   ` Jean Tourrilhes
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2004-06-11 23:27 UTC (permalink / raw)
  To: jt; +Cc: netdev, Nimrod Zimerman, Niibe Yutaka

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 :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Plip ioctl bug
  2004-06-11 23:27 ` Jeff Garzik
@ 2004-06-11 23:40   ` Jean Tourrilhes
  0 siblings, 0 replies; 3+ messages in thread
From: Jean Tourrilhes @ 2004-06-11 23:40 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Nimrod Zimerman, Niibe Yutaka

On Fri, Jun 11, 2004 at 07:27:50PM -0400, Jeff Garzik wrote:
> 
> already in the latest 2.6.x :)

	Doh ! I'm still catching up with my e-mail (after familial
events), I should have looked at the last kernel.
	Sorry about that...

	Jean

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-11 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-11 23:11 [PATCH] Plip ioctl bug Jean Tourrilhes
2004-06-11 23:27 ` Jeff Garzik
2004-06-11 23:40   ` Jean Tourrilhes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).