Skip to content
Commit 1c5c12ee authored by Tao Ren's avatar Tao Ren Committed by David S. Miller
Browse files

net/ncsi: handle overflow when incrementing mac address

Previously BMC's MAC address is calculated by simply adding 1 to the
last byte of network controller's MAC address, and it produces incorrect
result when network controller's MAC address ends with 0xFF.

The problem can be fixed by calling eth_addr_inc() function to increment
MAC address; besides, the MAC address is also validated before assigning
to BMC.

Fixes: cb10c7c0

 ("net/ncsi: Add NCSI Broadcom OEM command")
Signed-off-by: default avatarTao Ren <taoren@fb.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffbf9870
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