mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
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>
This commit is contained in:
parent
7b4577a9da
commit
f81edc6ac1
1 changed files with 1 additions and 1 deletions
|
@ -938,7 +938,7 @@ static void eth_set_mcast_list(struct net_device *dev)
|
||||||
int i;
|
int i;
|
||||||
static const u8 allmulti[] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
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++) {
|
for (i = 0; i < ETH_ALEN; i++) {
|
||||||
__raw_writel(allmulti[i], &port->regs->mcast_addr[i]);
|
__raw_writel(allmulti[i], &port->regs->mcast_addr[i]);
|
||||||
__raw_writel(allmulti[i], &port->regs->mcast_mask[i]);
|
__raw_writel(allmulti[i], &port->regs->mcast_mask[i]);
|
||||||
|
|
Loading…
Reference in a new issue