mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 10:13:57 +08:00
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>
This commit is contained in:
parent
2a3f279034
commit
914c8ad2d1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user