luci-mod-network: add PREF64 support 6439/head
authorOndřej Caletka <ondrej@caletka.cz>
Wed, 21 Jun 2023 14:48:05 +0000 (16:48 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 24 Jun 2023 21:53:24 +0000 (23:53 +0200)
Add support for ra_pref64 option for IPv6 Router Advertisements
options.
This option of IPv6 Router Advertisements allows devices connected to
a IPv6-only network to discover IPv6 prefix of the NAT64 gateway.
Devices can use this information for instance to setup client translator
(CLAT) from IPv4 to IPv6 in 464XLAT (RFC 6877) scenario or to handle
IPv4 address literal on application level.

Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
[ remove extra new line and fix commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index ebd9c05c56a3c7683d0736fc591dd33685184b20..70370846df162d91ea6d5af3bb038036c7cd822b 100644 (file)
@@ -832,6 +832,13 @@ return view.extend({
                                                }
                                        };
 
+                                       so = ss.taboption('ipv6-ra', form.Value, 'ra_pref64', _('NAT64 prefix'), _('Announce NAT64 prefix in <abbr title="Router Advertisement">RA</abbr> messages.'));
+                                       so.optional = true;
+                                       so.datatype = 'cidr6';
+                                       so.placeholder = '64:ff9b::/96';
+                                       so.depends('ra', 'server');
+                                       so.depends({ ra: 'hybrid', master: '0' });
+
                                        so = ss.taboption('ipv6-ra', form.Value, 'ra_maxinterval', _('Max <abbr title="Router Advertisement">RA</abbr> interval'), _('Maximum time allowed  between sending unsolicited <abbr title="Router Advertisement, ICMPv6 Type 134">RA</abbr>. Default is 600 seconds.'));
                                        so.optional = true;
                                        so.datatype = 'uinteger';