net: fix dev_set_promiscuity() breakage

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>
This commit is contained in:
Patrick McHardy 2008-07-06 15:49:08 -07:00 committed by David S. Miller
parent fb0305ce1b
commit 4b5a698ef4

View 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);