summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/xscale
diff options
context:
space:
mode:
authorDerrick Pallas <pallas@meraki.com>2015-02-18 11:50:25 +0300
committerDavid S. Miller <davem@davemloft.net>2015-02-20 23:49:07 +0300
commitf81edc6ac1e1e2e2cbe98bcd6ef5ebb7afb00807 (patch)
tree064426f731f97f44fb09bd6d17dcf237054b7111 /drivers/net/ethernet/xscale
parent7b4577a9da3702049650f7095506e9afd9f68849 (diff)
downloadlinux-f81edc6ac1e1e2e2cbe98bcd6ef5ebb7afb00807.tar.xz
ethernet/ixp4xx: prevent allmulti from clobbering promisc
If both promisc and allmulti are set, promisc should trump allmulti and disable the MAC filter; otherwise, the interface is not really promisc. Previously, this code checked IFF_ALLMULTI prior to and without regard for IFF_PROMISC; if both were set, only multicast and direct unicast traffic would make it through the filter. Signed-off-by: Derrick Pallas <pallas@meraki.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xscale')
-rw-r--r--drivers/net/ethernet/xscale/ixp4xx_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index f7e0f0f7c2e2..9e16a2819d48 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -938,7 +938,7 @@ static void eth_set_mcast_list(struct net_device *dev)
int i;
static const u8 allmulti[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
- if (dev->flags & IFF_ALLMULTI) {
+ if ((dev->flags & IFF_ALLMULTI) && !(dev->flags & IFF_PROMISC)) {
for (i = 0; i < ETH_ALEN; i++) {
__raw_writel(allmulti[i], &port->regs->mcast_addr[i]);
__raw_writel(allmulti[i], &port->regs->mcast_mask[i]);