On 2024-11-28 10:10, Paolo Abeni wrote: > On 11/24/24 00:54, Foster Snowhill wrote: >> Introduce an rx_error label to reduce repetitions in the header signature >> checks. >> >> Store wDatagramIndex and wDatagramLength after endianness conversion to >> avoid repeated le16_to_cpu() calls. >> >> Rewrite the loop to return on a null trailing DPE, which is required >> by the CDC NCM spec. In case it is missing, fall through to rx_error. >> >> Fix an out-of-bounds DPE read, limit the number of processed DPEs to >> the amount that fits into the fixed-size NDP16 header. > > It looks like this patch is doing 2 quite unrelated things, please split > it in 2 separate patch: > > patch 1 refactors the code introducing the rx_error label > patch 2 fixes the out-of-bounds Agreed, will do in v4, thank you!