net: fix address check in rtnl_fdb_del
authorVlad Yasevich <vyasevic@redhat.com>
Tue, 23 Apr 2013 11:05:23 +0000 (11:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Apr 2013 08:14:08 +0000 (04:14 -0400)
Commit 6681712d67eef14c4ce793561c3231659153a320
vxlan: generalize forwarding tables

relaxed the address checks in rtnl_fdb_del() to use is_zero_ether_addr().
This allows users to add multicast addresses using the fdb API.  However,
the check in rtnl_fdb_del() still uses a more strict
is_valid_ether_addr() which rejects multicast addresses.  Thus it
is possible to add an fdb that can not be later removed.
Relax the check in rtnl_fdb_del() as well.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index 18af08a73f0a719ecaf3e56ae0f89783c8d90f77..a08bd2b7fe3f06901d6c75e82df5e51e1aa2234f 100644 (file)
@@ -2192,7 +2192,7 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh)
        }
 
        addr = nla_data(tb[NDA_LLADDR]);
-       if (!is_valid_ether_addr(addr)) {
+       if (is_zero_ether_addr(addr)) {
                pr_info("PF_BRIDGE: RTM_DELNEIGH with invalid ether address\n");
                return -EINVAL;
        }