Linux/linux 1c5c12einclude/linux etherdevice.h, net/ncsi ncsi-rsp.c

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: cb10c7c0dfd9 ("net/ncsi: Add NCSI Broadcom OEM command")
Signed-off-by: Tao Ren <taoren at fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski at netronome.com>
Acked-by: Samuel Mendoza-Jonas <sam at mendozajonas.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
DeltaFile
+12-0include/linux/etherdevice.h
+5-1net/ncsi/ncsi-rsp.c
+17-12 files

UnifiedSplitRaw