Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / net / bridge / br_fdb.c
index ebfa4443c69b3cd62b1bcbf94190a579bfb0115b..60aca9109a508d5a75c5b34befbdca8c7364fe52 100644 (file)
@@ -707,6 +707,11 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
                }
        }
 
+       if (is_zero_ether_addr(addr)) {
+               pr_info("bridge: RTM_NEWNEIGH with invalid ether address\n");
+               return -EINVAL;
+       }
+
        p = br_port_get_rtnl(dev);
        if (p == NULL) {
                pr_info("bridge: RTM_NEWNEIGH %s not a bridge port\n",