diff options
Diffstat (limited to 'net/core/dev_mcast.c')
-rw-r--r-- | net/core/dev_mcast.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 9e2fa39..3dc295b 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -96,7 +96,10 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) int err; netif_addr_lock_bh(dev); - err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl); + if (alen != dev->addr_len) + err = -EINVAL; + else + err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl); if (!err) __dev_set_rx_mode(dev); netif_addr_unlock_bh(dev); |