openvpn: handler: refine netifd routing and config
authorChen Minqiang <redacted>
Mon, 30 Mar 2026 16:21:21 +0000 (00:21 +0800)
committerFlorian Eckert <redacted>
Fri, 17 Apr 2026 06:48:33 +0000 (08:48 +0200)
commitbb02e8b73412f0db624d2df31a58803a4cd9ea47
tree2125e600753d62a8216c97de6b6f373b34711929
parent420d966267efdc34e52fcadc75fe40b246cbb9ea
openvpn: handler: refine netifd routing and config

Introduce a new `ipv6` proto option for OpenVPN netifd integration and
export it to the hotplug environment. IPv6 remains enabled by default,
but can now be explicitly disabled per instance.

Update the hotplug helper to apply IPv6 addresses and routes only when
IPv6 is enabled, allowing cleaner IPv4-only tunnel deployments.

Also improve route handling by:
- ignoring invalid default gateway values (0.0.0.0 / ::)
- replacing fixed `seq` loops with shell-safe while loops
- keeping trusted peer host routes conditional on valid gateways

Signed-off-by: Chen Minqiang <redacted>
net/openvpn/Makefile
net/openvpn/files/lib/netifd/proto/openvpn.sh
net/openvpn/files/usr/libexec/openvpn-hotplug
git clone https://git.99rst.org/PROJECT