zephyr/subsys
Robert Lubos a28dba2503 net: ip: 6lo: Fix corner case with packet format after IPHC
IEEE802154 drivers expect, that a complete 802.15.4 frame fits into a
single net_buf provided in a net_pkt.

There is a corner case with header compression when this could not be
the case. If the IPv6 packet before IPHC exceeded 802.15.4 MTU, it'd
consist of several net_buf's. This was not an issue, if the IPv6 packet
after header compression still required fragmentation, as the
fragmentation module took care of formatting individual net_buf's
properly.

For short range of packet sizes however this was no the case. The IPv6
packet, after header compression, might not require fragmentation any
more. As the IPHC logic only modified the IPv6 header part, by trimming
the buffer in front of the net_buf, such a packet would still consist of
two net_bufs, even though it should fit into a single 15.4 frame. Such
packet was passed to the driver, causing the driver to send only part of
the packet, from the first net_buf.

Fix this, by using net_pkt functions to manipulate the packet, instead
of operating on net_buf directly. net_pkt_pull() will not trim the
buffer in front, but rather move the entire packet content to the front.
On the other hand, net_pkt_compact() will assure that there's no gaps in
the net_bufs. In result, packets that do not require fragmentation,
should be placed into a single net_buf, as expected by drivers.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-02-19 20:33:36 -05:00
..
bluetooth Bluetooth: Host: Check returned value by LE_READ_BUFFER_SIZE 2023-02-18 00:09:13 +09:00
canbus
console
debug modules: build segger debugmon code with config 2022-12-28 12:00:46 +01:00
demand_paging
dfu mcuboot: Remove public dependency on bootutil 2023-01-12 19:08:23 +01:00
disk
dsp
emul i2c: Allow dumping the data of read messages 2023-01-26 14:55:44 -05:00
fb
fs nvs: use CRC8 if cache size is 256 2023-01-23 12:04:55 +00:00
ipc ipc: icmsg multi endpoint with nocopy in receive path 2022-12-22 11:07:44 +01:00
jwt
logging logging: shell: Fix using uninitialized variables 2023-01-28 08:55:41 +09:00
lorawan lorawan: services: add Application Layer Clock Synchronization 2023-01-23 10:05:49 +00:00
mgmt mgmt/osdp: Use memcpy instead of raw loops in many places 2023-01-27 20:28:34 +09:00
modbus modbus: Remove redundant check 2023-02-06 10:03:20 +01:00
net net: ip: 6lo: Fix corner case with packet format after IPHC 2023-02-19 20:33:36 -05:00
pm pm: device: rework pm_device_children_action_run 2023-01-25 14:58:52 +00:00
portability
random rand32_timer: make it more random-like for tests to pass 2023-01-27 17:38:26 +09:00
rtio
sd sd: Enable eMMC cache 2023-01-14 09:22:22 +01:00
settings settings fcb: Increase buffer for mcu with large write block size 2023-01-26 22:50:40 +09:00
shell shell: backend: Set RX size default to 256 if shell MCUmgr is enabled 2023-02-10 22:25:21 +09:00
stats
storage storage: flash_map: Add name for select integrity backend 2023-01-09 15:24:10 +00:00
task_wdt
testsuite ztest: make the FPU flush workaround more generic 2023-01-24 15:26:18 +01:00
timing
tracing tracing: Add event tracing to sysview 2023-02-02 20:21:12 +09:00
usb usb: device: class: rndis: remove CDC descriptors 2023-02-11 08:19:32 +09:00
zbus
CMakeLists.txt lib: cpp: Relocate subsys/cpp to lib/cpp 2023-01-13 17:42:55 -05:00
Kconfig lib: cpp: Relocate subsys/cpp to lib/cpp 2023-01-13 17:42:55 -05:00