Re: [PATCH net v2 2/2] net/ncsi: handle overflow when incrementing mac address

From: Tao Ren
Date: Wed Apr 24 2019 - 01:31:07 EST


Please ignore this email. Something was wrong with my email client: the email was supposed to be delivered 8 hours ago but surprisingly it arrived now. Sorry about the noise..

- Tao

On 4/23/19, 9:41 PM, "openbmc on behalf of Tao Ren" <openbmc-bounces+taoren=fb.com@xxxxxxxxxxxxxxxx on behalf of taoren@xxxxxx> wrote:
> 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 "net_addr_inc" function to increment
> MAC address; besides, the MAC address is also validated before assigning
> to BMC.
>
> Fixes: cb10c7c0dfd9 ("net/ncsi: Add NCSI Broadcom OEM command")
> Signed-off-by: Tao Ren <taoren@xxxxxx>