Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187906
b: refs/heads/master
c: 1162563
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Mar 3, 2010
1 parent a898d08 commit 4baebb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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: 9fe969345b10931319b3f1e7034fbdeb786de234
refs/heads/master: 1162563f82b434e3099c9e6c1bbdba846d792f0d
6 changes: 5 additions & 1 deletion trunk/net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
{
switch (i->type) {
case PACKET_MR_MULTICAST:
if (i->alen != dev->addr_len)
return -EINVAL;
if (what > 0)
return dev_mc_add(dev, i->addr, i->alen, 0);
else
Expand All @@ -1700,6 +1702,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i,
return dev_set_allmulti(dev, what);
break;
case PACKET_MR_UNICAST:
if (i->alen != dev->addr_len)
return -EINVAL;
if (what > 0)
return dev_unicast_add(dev, i->addr);
else
Expand Down Expand Up @@ -1734,7 +1738,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq)
goto done;

err = -EINVAL;
if (mreq->mr_alen != dev->addr_len)
if (mreq->mr_alen > dev->addr_len)
goto done;

err = -ENOBUFS;
Expand Down

0 comments on commit 4baebb1

Please sign in to comment.