[PATCH net-next] net/ncsi: support unaligned payload size in NC-SI cmd handler
David Miller
davem at davemloft.net
Tue Sep 3 05:03:00 AEST 2019
From: Ben Wei <benwei at fb.com>
Date: Mon, 2 Sep 2019 02:46:52 +0000
> Update NC-SI command handler (both standard and OEM) to take into
> account of payload paddings in allocating skb (in case of payload
> size is not 32-bit aligned).
>
> The checksum field follows payload field, without taking payload
> padding into account can cause checksum being truncated, leading to
> dropped packets.
>
> Signed-off-by: Ben Wei <benwei at fb.com>
If you have to align and add padding, I do not see where you are
clearing out that padding memory to make sure it is initialized.
You do comparisons with 'payload' but make adjustments to 'len'.
The logic is very confusing.
More information about the openbmc
mailing list