Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150353
b: refs/heads/master
c: d95ed92
h: refs/heads/master
i:
  150351: 9557237
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed May 21, 2009
1 parent 90d41a4 commit ccb8e92
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca0f31125c5cf0d48f47c2e1a3785a08876a7e87
refs/heads/master: d95ed9275edcb8995bda31005bb3f55e087626d7
1 change: 1 addition & 0 deletions trunk/include/linux/if_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,6 @@ struct packet_mreq
#define PACKET_MR_MULTICAST 0
#define PACKET_MR_PROMISC 1
#define PACKET_MR_ALLMULTI 2
#define PACKET_MR_UNICAST 3

#endif
10 changes: 8 additions & 2 deletions trunk/net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1570,16 +1570,22 @@ 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);
break;
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;
Expand Down

0 comments on commit ccb8e92

Please sign in to comment.