|
@@ -739,7 +739,10 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|
struct macvlan_dev *vlan = netdev_priv(dev);
|
|
struct macvlan_dev *vlan = netdev_priv(dev);
|
|
int err = -EINVAL;
|
|
int err = -EINVAL;
|
|
|
|
|
|
- if (!vlan->port->passthru)
|
|
|
|
|
|
+ /* Support unicast filter only on passthru devices.
|
|
|
|
+ * Multicast filter should be allowed on all devices.
|
|
|
|
+ */
|
|
|
|
+ if (!vlan->port->passthru && is_unicast_ether_addr(addr))
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
if (flags & NLM_F_REPLACE)
|
|
if (flags & NLM_F_REPLACE)
|
|
@@ -760,7 +763,10 @@ static int macvlan_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
|
|
struct macvlan_dev *vlan = netdev_priv(dev);
|
|
struct macvlan_dev *vlan = netdev_priv(dev);
|
|
int err = -EINVAL;
|
|
int err = -EINVAL;
|
|
|
|
|
|
- if (!vlan->port->passthru)
|
|
|
|
|
|
+ /* Support unicast filter only on passthru devices.
|
|
|
|
+ * Multicast filter should be allowed on all devices.
|
|
|
|
+ */
|
|
|
|
+ if (!vlan->port->passthru && is_unicast_ether_addr(addr))
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
if (is_unicast_ether_addr(addr))
|
|
if (is_unicast_ether_addr(addr))
|