Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110229
b: refs/heads/master
c: b6c40d6
h: refs/heads/master
i:
  110227: af8f4fb
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Oct 7, 2008
1 parent a5b05c7 commit 8f67597
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 859f4c74d8de4dc344b3a115367d5e22a79bddaf
refs/heads/master: b6c40d68ff6498b7f63ddf97cf0aa818d748dee7
16 changes: 10 additions & 6 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,12 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
return 0;
}

static void dev_change_rx_flags(struct net_device *dev, int flags)
{
if (dev->flags & IFF_UP && dev->change_rx_flags)
dev->change_rx_flags(dev, flags);
}

static int __dev_set_promiscuity(struct net_device *dev, int inc)
{
unsigned short old_flags = dev->flags;
Expand Down Expand Up @@ -2955,8 +2961,7 @@ static int __dev_set_promiscuity(struct net_device *dev, int inc)
current->uid, current->gid,
audit_get_sessionid(current));

if (dev->change_rx_flags)
dev->change_rx_flags(dev, IFF_PROMISC);
dev_change_rx_flags(dev, IFF_PROMISC);
}
return 0;
}
Expand Down Expand Up @@ -3022,8 +3027,7 @@ int dev_set_allmulti(struct net_device *dev, int inc)
}
}
if (dev->flags ^ old_flags) {
if (dev->change_rx_flags)
dev->change_rx_flags(dev, IFF_ALLMULTI);
dev_change_rx_flags(dev, IFF_ALLMULTI);
dev_set_rx_mode(dev);
}
return 0;
Expand Down Expand Up @@ -3347,8 +3351,8 @@ int dev_change_flags(struct net_device *dev, unsigned flags)
* Load in the correct multicast list now the flags have changed.
*/

if (dev->change_rx_flags && (old_flags ^ flags) & IFF_MULTICAST)
dev->change_rx_flags(dev, IFF_MULTICAST);
if ((old_flags ^ flags) & IFF_MULTICAST)
dev_change_rx_flags(dev, IFF_MULTICAST);

dev_set_rx_mode(dev);

Expand Down

0 comments on commit 8f67597

Please sign in to comment.