diff options
| author | Ingo Molnar <mingo@elte.hu> | 2010-03-15 03:17:33 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2010-03-15 03:17:33 -0400 |
| commit | 12b8aeee3e51654fb95a3baff2e093f2513bb87d (patch) | |
| tree | 73f78d62591b197cd53747e36a2f3d707b79a50b /net/packet/af_packet.c | |
| parent | 25268498c9e07870323aead10751b7c6e99a3a78 (diff) | |
| parent | a3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff) | |
Merge branch 'linus' into timers/core
Conflicts:
Documentation/feature-removal-schedule.txt
Merge reason: Resolve the conflict, update to upstream.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/packet/af_packet.c')
| -rw-r--r-- | net/packet/af_packet.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 031a5e6fb4aa..1612d417d10c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
| @@ -1688,6 +1688,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, | |||
| 1688 | { | 1688 | { |
| 1689 | switch (i->type) { | 1689 | switch (i->type) { |
| 1690 | case PACKET_MR_MULTICAST: | 1690 | case PACKET_MR_MULTICAST: |
| 1691 | if (i->alen != dev->addr_len) | ||
| 1692 | return -EINVAL; | ||
| 1691 | if (what > 0) | 1693 | if (what > 0) |
| 1692 | return dev_mc_add(dev, i->addr, i->alen, 0); | 1694 | return dev_mc_add(dev, i->addr, i->alen, 0); |
| 1693 | else | 1695 | else |
| @@ -1700,6 +1702,8 @@ static int packet_dev_mc(struct net_device *dev, struct packet_mclist *i, | |||
| 1700 | return dev_set_allmulti(dev, what); | 1702 | return dev_set_allmulti(dev, what); |
| 1701 | break; | 1703 | break; |
| 1702 | case PACKET_MR_UNICAST: | 1704 | case PACKET_MR_UNICAST: |
| 1705 | if (i->alen != dev->addr_len) | ||
| 1706 | return -EINVAL; | ||
| 1703 | if (what > 0) | 1707 | if (what > 0) |
| 1704 | return dev_unicast_add(dev, i->addr); | 1708 | return dev_unicast_add(dev, i->addr); |
| 1705 | else | 1709 | else |
| @@ -1734,7 +1738,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq) | |||
| 1734 | goto done; | 1738 | goto done; |
| 1735 | 1739 | ||
| 1736 | err = -EINVAL; | 1740 | err = -EINVAL; |
| 1737 | if (mreq->mr_alen != dev->addr_len) | 1741 | if (mreq->mr_alen > dev->addr_len) |
| 1738 | goto done; | 1742 | goto done; |
| 1739 | 1743 | ||
| 1740 | err = -ENOBUFS; | 1744 | err = -ENOBUFS; |
