From: Vladislav Grigoryev Date: Mon, 20 Sep 2021 21:36:39 +0000 (+0300) Subject: luci-mod-network: support network.interface.sourcefilter X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=39fae47e3d17b27d18fdd9e3df459157650f7719;p=project%2Fluci.git luci-mod-network: support network.interface.sourcefilter 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 (cherry picked from commit 22296fb07276159f6d1dae719f32920ad52d5873) --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js index a730dc4d71..49c6879637 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/interfaces.js @@ -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;