UPDATE: Case-Sensitivity Fix & Hardened Service Sandbox (v1.5.3+ Breakthrough)
Following up on my previous live wireless debugging sessions, my team and I have successfully verified the exact interaction pattern and locked down a 100% zero-leak state under active runtime conditions.
During our final integration testing for the management addon, we isolated two critical regressions in the initial workaround parameters that other users/developers should be aware of:
1. ConnMan Configuration Case-Sensitivity
ConnMan's underlying GLib key-file parser is strictly case-sensitive. My previous configuration block utilized lowercase keys (e.g., onlinecheckmode). Because of this typographical mismatch, ConnMan completely ignored those lines and quietly fell back to its default background testing intervals, keeping the background tracking loops fully alive.
The configuration layout must use strict camelCase fields to be parsed correctly:
[General]
preferredtechnologies = ethernet,wifi,cellular
OnlineCheckMode = none
OnlineCheckIPv4URL =
OnlineCheckIPv6URL =
OnlineCheckInterval = 0
OnlineCheckURL =
Once corrected to uppercase camelCase, the journal log immediately confirms the tracking engine has successfully flattened out:
connmand[1859187]: Online check disabled; interface eth0 [ ethernet ] remains in ready state.
2. Dropping LimitNOFILE from 4096 down to 512 (The Safe Sandbox Boundary)
Setting LimitNOFILE=4096 in the systemd override actually creates a dangerous race condition against the host environment. Because the Linux kernel's global default allocation maximum for an unprivileged process space defaults to 1024, setting systemd's ceiling to 4096 means a cascading Wi-Fi netlink handle leak will breach the kernel ceiling long before it hits the systemd limit. This results in the exact hard network lockup and dropped SSH terminal access we are trying to prevent.
By dropping the process sandbox boundary down to 512, systemd acts as a highly effective, native circuit breaker. If a user runs exclusively on Wi-Fi and cycles their VPN repeatedly, systemd will cleanly catch, terminate, and gracefully restart the daemon *before* it can exhaust the global OS resource table—keeping host routing tables 100% stable.
The corrected /storage/.config/system.d/connman.service.d/override.conf:
[Service]
ExecStart=
ExecStart=/usr/sbin/connmand -nr --config=/storage/.config/connman_main.conf --nodnsproxy
ExecStartPost=/bin/sh -c "sleep 2; if ! grep -q 'Method=manual' /storage/.cache/connman/*/settings 2>/dev/null; then echo -e 'nameserver 1.1.1.1\nnameserver 9.9.9.9' >> /etc/resolv.conf; fi"
LimitNOFILE=512
LogRateLimitIntervalSec=0
Live Verification Results:
After forcing a systemctl daemon-reload and cycling our target WireGuard interface (vpn_91_90_123_2) 10 times consecutively over a live monitoring window, the process limit ceiling safely clamped and the file handle loops fully stabilized at an ultra-low, flat baseline:
Every 1.0s: echo -n 'VPN Daemon (connman-vpnd): '; ls -l /proc/$(pidof connman-vpnd)/fd 2>/dev/null | wc -l; echo -n 'Main Daemon (connmand): '; ls -l /proc/$(pidof connmand)/fd 2>/dev/null | wc -l
VPN Daemon (connman-vpnd): 10
Main Daemon (connmand): 19
The structural leak is neutralized, execution tracking boundaries are safely held on LibreELEC, and process allocation profiles remain completely flatlined. These automatic configuration rewrites are fully integrated into our add-on upcoming release.
Salute!