luci-proto-xfrm: replace ifid datatype check with range check

According to the documentation, values from '1' to '4294967295' are allowed
values for the 'ifid' option. The value ‘0’ is excluded, as '0' is treated
as the default ID or an unassigned ID.

While we’re at it, mark the option as non-optional.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2026-07-02 14:41:20 +02:00
committed by Paul Donald
parent dc704c5668
commit 21818b3a0d
@@ -37,7 +37,8 @@ return network.registerProtocol('xfrm', {
var o, ss;
o = s.taboption('general', form.Value, 'ifid', _('Interface ID'), _('Required. XFRM interface ID to be used for SA.'));
o.datatype = 'integer';
o.datatype = 'range(1,4294967295)';
o.rmempty = false;
o = s.taboption('general', widgets.NetworkSelect, 'tunlink', _('Underlying interface'),_('Optional. Bind to a specific interface.'));
o.exclude = s.section;