macvlan fdb replace support
authorThomas Richter <tmricht@linux.vnet.ibm.com>
Fri, 19 Jul 2013 15:20:08 +0000 (17:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jul 2013 23:36:03 +0000 (16:36 -0700)
Add support for iproute2 command 'bridge fdb replace ...'.
The rtnletlink call back function ndo_fdb_add will be called
with the NLM_F_REPLACE flag set.
Simply return -EOPNOTSUP.

Resubmitted because net-next was closed last week.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index 18373b6ae37d78543cf925e2d86efab1578f3019..74907f53fdb40d45046749c88398967cf704edb4 100644 (file)
@@ -597,6 +597,9 @@ static int macvlan_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
        if (!vlan->port->passthru)
                return -EOPNOTSUPP;
 
+       if (flags & NLM_F_REPLACE)
+               return -EOPNOTSUPP;
+
        if (is_unicast_ether_addr(addr))
                err = dev_uc_add_excl(dev, addr);
        else if (is_multicast_ether_addr(addr))