net: fix dev_set_promiscuity() breakage
authorPatrick McHardy <kaber@trash.net>
Sun, 6 Jul 2008 22:49:08 +0000 (15:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Jul 2008 22:49:08 +0000 (15:49 -0700)
Commit dad9b335 (netdevice: Fix promiscuity and allmulti overflow) broke
dev_set_promiscuity() by returning on success without reprogramming the
device.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index bfa9a6a951ddb271b83bb1d75ecc08b0d878a8b0..75933932463d2448802fe5a3eedc8f7c71bf8cf6 100644 (file)
@@ -2859,7 +2859,7 @@ int dev_set_promiscuity(struct net_device *dev, int inc)
        int err;
 
        err = __dev_set_promiscuity(dev, inc);
-       if (!err)
+       if (err < 0)
                return err;
        if (dev->flags != old_flags)
                dev_set_rx_mode(dev);