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 15:02:17 +0000 (16:02 +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 415dfb7fdba105b9e78620f2c14ce1a86b384bd1..551995fe78039128393590c0fe3ada387c15d800 100644 (file)
@@ -574,6 +574,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.'));