aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-24 18:57:04 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 07:18:34 -0500
commit914c8ad2d18b62ad1420f518c0cab0b0b90ab308 (patch)
tree1e2d35a5dd2c1dcba1cc02f9c022ce923dc12d9f
parent2a3f279034b46204b50408aa2c25ee0882120147 (diff)
af_packet: do not accept mc address smaller then dev->addr_len in packet_mc_add()
There is no point of accepting an address of smaller length than dev->addr_len here. Therefore change this for stonger check. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/packet/af_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 2f0369367ee0..e2d1def70841 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1734,7 +1734,7 @@ static int packet_mc_add(struct sock *sk, struct packet_mreq_max *mreq)
1734 goto done; 1734 goto done;
1735 1735
1736 err = -EINVAL; 1736 err = -EINVAL;
1737 if (mreq->mr_alen > dev->addr_len) 1737 if (mreq->mr_alen != dev->addr_len)
1738 goto done; 1738 goto done;
1739 1739
1740 err = -ENOBUFS; 1740 err = -ENOBUFS;