Commit 914c8ad2 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

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: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a3f2790
......@@ -1734,7 +1734,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment