From b869935ff747ce3eab7fc6f1efeff280d4dfeb46 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jul 2022 21:44:51 +0200 Subject: [PATCH 1/2] Remove display of gre and loopback in MPTCP app --- luci-app-mptcp/luasrc/model/cbi/mptcp.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua index d853e8e49..e401c59f0 100644 --- a/luci-app-mptcp/luasrc/model/cbi/mptcp.lua +++ b/luci-app-mptcp/luasrc/model/cbi/mptcp.lua @@ -97,6 +97,9 @@ else end s = m:section(TypedSection, "interface", translate("Interfaces Settings")) +function s.filter(self, section) + return not section:match("^oip.*") and not section:match("^lo.*") and section ~= "omrvpn" and section ~= "omr6in4" +end o = s:option(ListValue, "multipath", translate("Multipath TCP"), translate("One interface must be set as master")) o:value("on", translate("enabled")) o:value("off", translate("disabled")) From ea4289223cb8432dd7f800a136c9f20c2500f067 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jul 2022 21:46:22 +0200 Subject: [PATCH 2/2] Add speed and duplex setting in network page --- .../luci-static/resources/tools/network.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/luci-mod-network/htdocs/luci-static/resources/tools/network.js b/luci-mod-network/htdocs/luci-static/resources/tools/network.js index b08f84058..311242905 100644 --- a/luci-mod-network/htdocs/luci-static/resources/tools/network.js +++ b/luci-mod-network/htdocs/luci-static/resources/tools/network.js @@ -622,6 +622,23 @@ return baseclass.extend({ o = this.replaceOption(s, 'devadvanced', form.Flag, 'promisc', _('Enable promiscuous mode')); o.default = o.disabled; + o = this.replaceOption(s, 'devadvanced', form.Flag, 'autoneg', _('Autonegociation')); + o.default = o.enabled; + + o = this.replaceOption(s, 'devadvanced', form.Value, 'speed', _('Speed')); + o.placeholder = dev ? dev.getSpeed() : ''; + o.default = ''; + o.rmempty = true; + o.datatype = 'uinteger'; + o.depends('autoneg', '0'); + + o = this.replaceOption(s, 'devadvanced', form.ListValue, 'duplex', _('Duplex')); + o.default = ''; + o.value('', _('unknown')); + o.value('half', _('half')); + o.value('full', _('full')); + o.depends('autoneg', '0'); + o = this.replaceOption(s, 'devadvanced', form.ListValue, 'rpfilter', _('Reverse path filter')); o.default = ''; o.value('', _('disabled'));