luci-app-strongswan-swanctl: allow empty remote_subnet for road-warrior connections
Is there an existing issue for this?
- I have searched among all existing issues (including closed issues)
screenshots or captures
Environment
- ImmortalWrt SNAPSHOT
r41388-465271e98e - Target:
qualcommax/ipq60xx - Package:
luci-app-strongswan-swanctl - strongSwan with
swanctl - IKEv2 road-warrior server using a virtual IP pool
The same frontend behavior is currently present in the OpenWrt LuCI master branch:
Problem
The LuCI tunnel configuration requires at least one remote_subnet value:
o = s.taboption('general', form.DynamicList, 'remote_subnet',
_('Remote Subnet'), _('Remote network(s)'));
o.datatype = 'cidr';
o.placeholder = '192.168.2.1/24';
o.rmempty = false;This is unsuitable for an IKEv2 road-warrior server that assigns virtual IP addresses from a pool.
For this use case, strongSwan should use the default:
remote_ts = dynamic
or simply omit remote_ts, because dynamic is the default value.
The OpenWrt strongSwan init script already supports this correctly. It only emits remote_ts when remote_subnet is non-empty.
However, LuCI prevents saving the tunnel when remote_subnet is empty.
Actual behaviour
LuCI reports Remote Subnet as invalid or required and refuses to save the configuration.
Expected behaviour
Remote Subnet should be optional. When it is empty, the init script should omit remote_ts, allowing strongSwan to use its default dynamic selector.
Steps to reproduce
- add package luci-app-strongswan-swanctl
- Open VPN -> strongSwan IPsec.
- Create or edit a tunnel configuration.
- Configure a local subnet, for example 172.30.229.0/24.
- Use the tunnel in an IKEv2 responder connection with an address pool, for example 172.30.20.0/24.
- Remove all values from Remote Subnet.
- Attempt to save the tunnel.
Additional Information
{
"kernel": "6.18.52",
"hostname": "ImmortalWrt",
"system": "ARMv8 Processor rev 4",
"model": "JDCloud RE-CS-07",
"board_name": "jdcloud,re-cs-07",
"rootfs_type": "squashfs",
"release": {
"distribution": "ImmortalWrt",
"version": "SNAPSHOT",
"firmware_url": "https://downloads.immortalwrt.org/",
"revision": "r41388-465271e98e",
"target": "qualcommax/ipq60xx",
"description": "ImmortalWrt SNAPSHOT r41388-465271e98e",
"builddate": "1789971623"
}
}What browsers do you see the problem on?
No response
Relevant log output
Source: openwrt/luci