mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 00:12:52 +00:00
net: add addr len check to dev_mc_add
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
committed by
David S. Miller
parent
c79c5ffdce
commit
6e17d45ae3
@@ -96,6 +96,8 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
|
||||
int err;
|
||||
|
||||
netif_addr_lock_bh(dev);
|
||||
if (alen != dev->addr_len)
|
||||
return -EINVAL;
|
||||
err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl);
|
||||
if (!err)
|
||||
__dev_set_rx_mode(dev);
|
||||
|
||||
Reference in New Issue
Block a user