Skip to content

Conversation

NordicBuilder
Copy link
Contributor

Backport 81eaa46~3..81eaa46 from #2759.

krish2718 and others added 3 commits April 15, 2025 00:46
Only a single condition is specific to RAW mode, rest should be
unconditional.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
(cherry picked from commit a409d31)
(cherry picked from commit bad9e65)
…uffers

The headroom was not taken into account for variable size data
buffers when CONFIG_NET_L2_ETHERNET_RESERVE_HEADER was enabled.

Add a test case for it to make sure the reserve allocation works
properly.

Fixes #84053

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
(cherry picked from commit 18cd2d8)
(cherry picked from commit 6052253)
The size calculation for the first buffer, in case extra headroom is
requested, had a bug which could result in a size variable underflow
followed by net_buf exhaustion.

In case the net_buf size was larger than requested size, but smaller
than requested size + headroom, the whole buffer size was subtracted
from the requested size. This however did not take the extra headroom
into account and in effect could result in underflow.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
(cherry picked from commit ea191bd)
(cherry picked from commit 81eaa46)
@krish2718 krish2718 force-pushed the backport-2759-to-v4.0.99-ncs1-branch branch from 6eb14b2 to 45eff64 Compare April 14, 2025 19:16
Copy link

@carlescufi carlescufi merged commit 3ecc854 into v4.0.99-ncs1-branch Apr 15, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants