nuttx-apps/system/iptables
zhanghongyu 2b0a4a20f5 iptables: add file lock to prevent concurrent overwrite
the kernel can only prevent the concurrency of s/getsockopt, but
iptables will call these interfaces multiple times at a time. We
need to wait for one iptables to complete before executing the second
one, otherwise the data will be overwritten.

iptables flow:
get current iptables entries [1] -> add new entry 2 [1,2] -> set to kernel [1,2]
get current iptables entries [1] -> add new entry 3 [1,3] -> set to kernel [1,3]
entry 2 is lost

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-01-15 17:20:03 +08:00
..
CMakeLists.txt
ip6tables.c
iptables.c iptables: add file lock to prevent concurrent overwrite 2026-01-15 17:20:03 +08:00
iptables.h
iptables_utils.c
Kconfig iptables: add file lock to prevent concurrent overwrite 2026-01-15 17:20:03 +08:00
Make.defs
Makefile