luci-mod-network: support network.interface.sourcefilter
authorVladislav Grigoryev <[email protected]>
Mon, 20 Sep 2021 21:36:39 +0000 (00:36 +0300)
committerJo-Philipp Wich <[email protected]>
Tue, 15 Feb 2022 23:35:10 +0000 (00:35 +0100)
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 <[email protected]>
(cherry picked from commit 22296fb07276159f6d1dae719f32920ad52d5873)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js

index a730dc4d718aff9c7365e20006ecaa976525e20a..49c68796378b1f6fb839906961b4b8b5f42efce5 100644 (file)
@@ -962,6 +962,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;