summaryrefslogtreecommitdiff
path: root/net/packet
diff options
context:
space:
mode:
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 766e6b41f7ca..c7c5d524967e 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1570,9 +1570,9 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
switch (i->type) {
case PACKET_MR_MULTICAST:
if (what > 0)
- dev_mc_add(dev, i->addr, i->alen, 0);
+ return dev_mc_add(dev, i->addr, i->alen, 0);
else
- dev_mc_delete(dev, i->addr, i->alen, 0);
+ return dev_mc_delete(dev, i->addr, i->alen, 0);
break;
case PACKET_MR_PROMISC:
return dev_set_promiscuity(dev, what);
@@ -1580,6 +1580,12 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
case PACKET_MR_ALLMULTI:
return dev_set_allmulti(dev, what);
break;
+ case PACKET_MR_UNICAST:
+ if (what > 0)
+ return dev_unicast_add(dev, i->addr, i->alen);
+ else
+ return dev_unicast_delete(dev, i->addr, i->alen);
+ break;
default:;
}
return 0;