zephyr/subsys
Robert Lubos 2c75070360 net: sockets: tcp: Fix possible race between connect/recv
Installing recv callback with net_context_recv() after
net_context_connect() left an opening for a possible race - in case the
server send some data immediately after establishing TCP connection, and
Zephyr did not manage to install the callback on time, the data would be
lost, corrupting the stream.

This can be avoided, by installing the recv callback before the
connection is triggered. As net_context_recv() called w/o timeout only
registers the callback function, it should have no negative impact. The
only change on the TCP side is when the connection is closed - in case
TCP is in connect stage, do not call the recv callback (before this
change it'd be NULL at that point).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-05-26 09:55:13 -04:00
..
bluetooth Bluetooth: KConfig: Enable ISO CTLR features if host has enabled them 2023-05-26 09:51:09 -04:00
canbus canbus: isotp: fix single frame state machine stuck issue 2023-04-12 17:45:04 +02:00
console
debug coredump: Intel ADSP memory window backend 2023-05-17 14:10:49 -04:00
demand_paging
dfu dfu: mcuboot_shell: Add command to enter serial recovery 2023-04-24 13:27:53 +02:00
disk subsys/disk: No need of runtime intialization for disk access part 2023-03-13 18:34:40 +00:00
dsp zdsp: add ARC DSPLIB backend for zdsp 2023-02-21 15:06:06 +01:00
emul iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
fb fb: cfb_shell: correct invert command implementation 2023-05-26 09:49:25 -04:00
fs fs: littlefs: add ability to build little fs without flash map 2023-05-19 15:53:29 +02:00
input iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
ipc ipc: icmsg: Add mutual exclussion access to shmem 2023-04-29 12:24:17 +02:00
jwt
logging logging: trigger log process once reach threshold 2023-05-24 05:06:11 -04:00
lorawan init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
mgmt mgmt: mcumgr: grp: os_mgmt: Fix issue and add xtensa 2023-05-26 15:05:29 +02:00
modbus modbus: cancel the server_work in modbus disable 2023-05-22 10:50:20 +02:00
net net: sockets: tcp: Fix possible race between connect/recv 2023-05-26 09:55:13 -04:00
pm pm: policy: add support for events 2023-05-25 16:29:40 -04:00
portability
random init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
retention retention: Add optional mutex disablement 2023-04-24 13:27:53 +02:00
rtio iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
sd sd: Return ret if error in sdmmc_spi_read_cxd 2023-03-28 09:23:47 +02:00
settings iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
shell shell: shell_cmds: added prompt commands 2023-05-22 12:03:03 +02:00
sip_svc iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
stats
storage storage: flash_map list partition labels 2023-05-05 10:02:19 +02:00
task_wdt
testsuite drivers: Console: Move all posix arch boards to same driver 2023-05-26 12:57:41 +02:00
timing
tracing iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
usb usb: device_next: allow string descriptor index to be updated 2023-05-26 09:48:19 -04:00
zbus zbus: remove POSIX arch iterable sections restriction 2023-05-23 22:09:33 +02:00
CMakeLists.txt subsystem: sip_svc: Add ARM SiP SVC subsystem 2023-05-09 08:46:50 -04:00
Kconfig subsystem: sip_svc: Add ARM SiP SVC subsystem 2023-05-09 08:46:50 -04:00