luci-mod-network: Restructure DHCP options 6705/head
authorPaul Donald <newtwen@gmail.com>
Wed, 24 Jan 2024 22:32:04 +0000 (23:32 +0100)
committerPaul Donald <newtwen@gmail.com>
Thu, 25 Jan 2024 23:57:24 +0000 (00:57 +0100)
DHCP devices: add minport and maxport

Signed-off-by: Paul Donald <newtwen@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

index 775a44614622e16889d7ae89fe611e65cb6f8c5b..6af406631063a439991bd82f1c885ee60a6943b1 100644 (file)
@@ -673,6 +673,22 @@ return view.extend({
                o.datatype = 'port';
                o.placeholder = _('any');
 
+               o = s.taboption('devices', form.Value, 'minport',
+                       _('Minimum source port #'),
+                       _('Min valid value %s.').format('<code>1024</code>') + ' ' + _('Useful for systems behind firewalls.'));
+               o.optional = true;
+               o.datatype = 'port';
+               o.placeholder = 1024;
+               o.depends('queryport', '');
+
+               o = s.taboption('devices', form.Value, 'maxport',
+                       _('Maximum source port #'),
+                       _('Max valid value %s.').format('<code>65535</code>') + ' ' + _('Useful for systems behind firewalls.'));
+               o.optional = true;
+               o.datatype = 'port';
+               o.placeholder = 50000;
+               o.depends('queryport', '');
+
                o = s.taboption('limits', form.Value, 'dhcpleasemax',
                        _('Max. DHCP leases'),
                        _('Maximum allowed number of active DHCP leases.'));