luci-mod-network: support network.interface.sourcefilter 5378/head
authorVladislav Grigoryev <vg.aetera@gmail.com>
Mon, 20 Sep 2021 21:36:39 +0000 (00:36 +0300)
committerVladislav Grigoryev <vg.aetera@gmail.com>
Wed, 22 Sep 2021 14:14:18 +0000 (17:14 +0300)
Allow to modify the sourcefilter option in the network.interface config.
This is required for custom policy routing with IPv6 MWAN and/or NAT6.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index 1ce7567afc2a3c98feaf1ff404c65a1515cce9aa..6aad8d10830757473eb9a1fa7b87f8e2f6b13dad 100644 (file)
@@ -952,6 +952,11 @@ return view.extend({
                                for (var i = 0; i < rtTables.length; i++)
                                        o.value(rtTables[i][1], '%s (%d)'.format(rtTables[i][1], rtTables[i][0]));
 
+                               if (protoval == 'dhcpv6') {
+                                       o = nettools.replaceOption(s, 'advanced', form.Flag, 'sourcefilter', _('IPv6 source routing'), _('Automatically handle multiple uplink interfaces using source-based policy routing.'));
+                                       o.default = o.enabled;
+                               }
+
                                o = nettools.replaceOption(s, 'advanced', form.Flag, 'delegate', _('Delegate IPv6 prefixes'), _('Enable downstream delegation of IPv6 prefixes available on this interface'));
                                o.default = o.enabled;