[PATCH usteer 0/2] Bound remote updates to MTU-safe UDP datagrams

Jan Leon jan at leoncode.de
Tue Sep 8 08:09:47 PDT 2026


Hi all,

This series bounds remote update datagrams without changing the existing
receive protocol. Large node/station updates are split at record boundaries
into payloads of at most 1200 bytes, with a smaller limit when required by
the local interface MTU. Indivisible oversized records return EMSGSIZE;
they are not truncated or sent through an oversized fallback.

The second patch initializes the socket before the initial periodic send
and avoids MTU queries through unregistered sockets, including correctly
handling file descriptor zero.

Validation completed on September 7 for this code included parser and
IPv4/IPv6 UDP loopback regression tests, ASan/UBSan runs, and deployment
across nine OpenWrt APs using ARM64 release, ARM64 snapshot and MIPS release
builds. Bounded capture windows at the senders showed payloads below the
1200-byte limit without IP fragmentation. All peers remained visible.
This is not a claim to fix unrelated WLAN or client connectivity issues,
and the local-MTU check is not general path-MTU discovery.

The same code is available for reference in GitHub PR #25:
https://github.com/openwrt/usteer/pull/25

This is the first mailing-list submission of the series. The GitHub commits
retain my previous address; this submission uses jan at leoncode.de for author
and sign-off metadata. There are no code changes relative to the PR head.

Thanks,
Jan

Jan Leon (2):
  remote: bound updates to MTU-safe UDP datagrams
  remote: initialize the socket before sending the first update

 CMakeLists.txt         |  18 ++-
 remote-message.c       | 142 ++++++++++++++++++++++
 remote-message.h       |  18 +++
 remote.c               |  54 +++++++--
 tests/README.md        |  54 +++++++++
 tests/remote-message.c | 264 +++++++++++++++++++++++++++++++++++++++++
 tests/remote-socket.c  |  89 ++++++++++++++
 7 files changed, 626 insertions(+), 13 deletions(-)
 create mode 100644 remote-message.c
 create mode 100644 remote-message.h
 create mode 100644 tests/README.md
 create mode 100644 tests/remote-message.c
 create mode 100644 tests/remote-socket.c


base-commit: 7532e1252fb937fe34b6da05e86fd34babd91ef5






More information about the openwrt-devel mailing list