luci-mod-network: interfaces.js: add dhcpv6_pd_min_len support
authorJohn Kohl <jtk.git@bostonpog.org>
Sun, 25 Jun 2023 02:33:26 +0000 (22:33 -0400)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 5 Jul 2023 18:56:35 +0000 (20:56 +0200)
Add support for setting dhcpv6_pd_min_len, which enforces a floor on the
IPv6 prefix delegation length, so the administrator can conserve IPv6 address
space on an interface.

Signed-off-by: John Kohl <jtk.git@bostonpog.org>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 161be918e7b2b9f57cd60d2cc66a744ce3622b39..82bf269e8abad2f79b79add2c620b6b041a56670 100644 (file)
@@ -909,6 +909,10 @@ return view.extend({
                                                _('Forward DHCPv6 messages between the designated master interface and downstream interfaces.'));
                                        so.value('hybrid', _('hybrid mode'), ' ');
 
+                                       so = ss.taboption('ipv6', form.Value, 'dhcpv6_pd_min_len', _('<abbr title="Prefix Delegation">PD</abbr> minimum length'),
+                                               _('Configures the minimum delegated prefix length assigned to a requesting downstream router, potentially overriding a requested prefix length. If left unspecified, the device will assign the smallest available prefix greater than or equal to the requested prefix.'));
+                                       so.datatype = 'range(1,62)';
+                                       so.depends('dhcpv6', 'server');
 
                                        so = ss.taboption('ipv6', form.DynamicList, 'dns', _('Announced IPv6 DNS servers'),
                                                _('Specifies a fixed list of IPv6 DNS server addresses to announce via DHCPv6. If left unspecified, the device will announce itself as IPv6 DNS server unless the <em>Local IPv6 DNS server</em> option is disabled.'));