luci-mod-network: Restructure DHCP options
authorPaul Donald <newtwen@gmail.com>
Wed, 24 Jan 2024 22:32:04 +0000 (23:32 +0100)
committerPaul Donald <newtwen@gmail.com>
Sun, 28 Jan 2024 14:25:02 +0000 (15:25 +0100)
DHCP devices: add minport and maxport

Signed-off-by: Paul Donald <newtwen@gmail.com>
(cherry picked from commit 60423d63f5d6f2f83aee1a56c31f214e78d4b86d)

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.'));