[Top] [All Lists]

Re: [PATCH] Plip ioctl bug

To: jt@xxxxxxxxxx
Subject: Re: [PATCH] Plip ioctl bug
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Fri, 11 Jun 2004 19:27:50 -0400
Cc: netdev@xxxxxxxxxxx, Nimrod Zimerman <zimerman@xxxxxxxxxxxxxxx>, Niibe Yutaka <gniibe@xxxxxxxxx>
In-reply-to: <20040611231154.GA21485@xxxxxxxxxxxxxxxxxx>
References: <20040611231154.GA21485@xxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
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...


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

<Prev in Thread] Current Thread [Next in Thread>