mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 04:47:12 +07:00
s390/qeth: validate device-provided MAC address
It's good practice to not blindly trust what the HW offers. Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Reviewed-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9c6dc7af85
commit
13bf829581
@ -920,6 +920,8 @@ static int qeth_l3_iqd_read_initial_mac_cb(struct qeth_card *card,
|
||||
|
||||
if (cmd->hdr.return_code)
|
||||
return -EIO;
|
||||
if (!is_valid_ether_addr(cmd->data.create_destroy_addr.mac_addr))
|
||||
return -EADDRNOTAVAIL;
|
||||
|
||||
ether_addr_copy(card->dev->dev_addr,
|
||||
cmd->data.create_destroy_addr.mac_addr);
|
||||
|
Loading…
Reference in New Issue
Block a user