aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 60e4ca01ccbb..a96955597755 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -739,7 +739,10 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
739 struct macvlan_dev *vlan = netdev_priv(dev); 739 struct macvlan_dev *vlan = netdev_priv(dev);
740 int err = -EINVAL; 740 int err = -EINVAL;
741 741
742 if (!vlan->port->passthru) 742 /* Support unicast filter only on passthru devices.
743 * Multicast filter should be allowed on all devices.
744 */
745 if (!vlan->port->passthru && is_unicast_ether_addr(addr))
743 return -EOPNOTSUPP; 746 return -EOPNOTSUPP;
744 747
745 if (flags & NLM_F_REPLACE) 748 if (flags & NLM_F_REPLACE)
@@ -760,7 +763,10 @@ static int macvlan_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
760 struct macvlan_dev *vlan = netdev_priv(dev); 763 struct macvlan_dev *vlan = netdev_priv(dev);
761 int err = -EINVAL; 764 int err = -EINVAL;
762 765
763 if (!vlan->port->passthru) 766 /* Support unicast filter only on passthru devices.
767 * Multicast filter should be allowed on all devices.
768 */
769 if (!vlan->port->passthru && is_unicast_ether_addr(addr))
764 return -EOPNOTSUPP; 770 return -EOPNOTSUPP;
765 771
766 if (is_unicast_ether_addr(addr)) 772 if (is_unicast_ether_addr(addr))