]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fm10k: ignore invalid multicast address entries
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 Jun 2015 23:30:58 +0000 (16:30 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:02:57 +0000 (22:02 -0800)
This change fixes an issue with adding an invalid multicast address
using the iproute2 tool (ip maddr add <MADDR> dev <dev>). The iproute2
tool and the kernel do not validate or filter the multicast addresses
when adding them to the multicast list. Thus, when synchronizing this
list with an invalid entry, the action will be aborted with an error
since the fm10k driver currently validates the list. Consequently,
multicast entries beyond the invalid one will not be processed and
communicated with the switch via the mailbox. This change makes it so
that invalid addresses will simply be skipped and allows synchronizing
the full list to proceed.

Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit 745136a8b72d638f3ee53a2b6a63f11c64a59937)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c

index 87630b0da5e9826444b403aa8f5fc0e22b8e2d5e..e6937d3c495e1c738c18c440b35d9597edb945fe 100644 (file)
@@ -941,18 +941,12 @@ static int __fm10k_mc_sync(struct net_device *dev,
        struct fm10k_intfc *interface = netdev_priv(dev);
        struct fm10k_hw *hw = &interface->hw;
        u16 vid, glort = interface->glort;
-       s32 err;
-
-       if (!is_multicast_ether_addr(addr))
-               return -EADDRNOTAVAIL;
 
        /* update table with current entries */
        for (vid = hw->mac.default_vid ? fm10k_find_next_vlan(interface, 0) : 0;
             vid < VLAN_N_VID;
             vid = fm10k_find_next_vlan(interface, vid)) {
-               err = hw->mac.ops.update_mc_addr(hw, glort, addr, vid, sync);
-               if (err)
-                       return err;
+               hw->mac.ops.update_mc_addr(hw, glort, addr, vid, sync);
        }
 
        return 0;