Skip to content

Commit 537f7f8

Browse files
committed
bridge: check for zero ether address in fdb add
The check for all-zero ether address was removed from rtnetlink core, since Vxlan uses all-zero ether address to signify default address. Need to add check back in for bridge. Signed-off-by: Stephen Hemminger <[email protected]>
1 parent 58e4c76 commit 537f7f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

net/bridge/br_fdb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,11 @@ int br_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
707707
}
708708
}
709709

710+
if (is_zero_ether_addr(addr)) {
711+
pr_info("bridge: RTM_NEWNEIGH with invalid ether address\n");
712+
return -EINVAL;
713+
}
714+
710715
p = br_port_get_rtnl(dev);
711716
if (p == NULL) {
712717
pr_info("bridge: RTM_NEWNEIGH %s not a bridge port\n",

0 commit comments

Comments
 (0)