summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-admin-full
AgeCommit message (Collapse)Author
2018-05-19luci-mod-admin-full: fix crash on wireless when no networks are declaredJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-19luci-mod-admin-full: do not override iface section in wireless cbi mapJo-Philipp Wich
Do override the iface section id upon commit to avoid clobbering the resulting configuration. The manual config sync is not needed anymore after switching to uncached ubus uci operations. Fixes #1770. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-18Merge pull request #1769 from jow-/masterJo-Philipp Wich
UCI apply/rollback workflow
2018-05-07luci-mod-admin-full: use fs.glob instead nixio.fs.globYousong Zhou
It's how the module was named when "require"d and used by other code in the same function Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-admin-full: no menu entry for leds if "/sys/class/leds" is emptyFlorian Eckert
Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-07luci-mod-admin-full: change supports_reset() test for factory resetFlorian Eckert
The check "supports_reset" only covers /proc/mtd partitions. If we have this the commands checks for names like ubi or rootfs_data. If this is found the system is possible for a factory reset. But on x86 the situation is different. We have no /proc/mtd partitions because this system do not use a bare metall flash. To solve this issue check if we have an overlay and if so we could do a factory reset. This could be applied for system which uses bare metal flash and system which uses FTL or harddisks. Jffs2reset is the current command used for factory reset. It will try to find volume "rootfs_data" and if it's mounted will delete all files under directory /overlay luci-mod-admin-mini also has check for reset available, but we leave it alone for now as it uses "mtd -r erase rootfs_data" Signed-off-by: Florian Eckert <fe@dev.tdt.de> Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2018-05-05luci-mod-admin-full: rework wifi configurationJo-Philipp Wich
- localize variables - get rid of redirects breaking apply workflow - auto-adjust unusable channels when switching country - use apply/rollback workflow when enabling/disabling networks Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-05treewide: rework uci apply workflowJo-Philipp Wich
Switch to rpcd based uci apply/rollback workflow which helps to avoid soft- bricking devices by requiring an explicit confirmation call after config apply. When a user now clicks "Save & Apply", LuCI first issues a call to uci apply which commits and reloads configuration, then goes into a polling countdown mode where it repeatedly attempts to call uci confirm. If the committed configuration is sane, the confirm call will go through and cancel rpcd's pending rollback timer. If the configuration change leads to a loss of connectivity (e.g. due to bad firewall rules or similar), the rollback mechanism will kick in after the timeout and revert configuration files and pending changes to the pre-apply state. In order to cover such rare cases where a lost of connectivity is expected and desired, the user is offered an "unchecked" apply option after timing out, which allows committing and applying the changes anyway, without the extra safety checks. As a consequence of this change, the luci-reload mechanism is now completely unsused since rpcd uses ubus config reload signals to reload affected services, which means that only procd-enabled services will receive proper reload treatment with the new workflow. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-02Fixing small typoRicardo Lamego
indentifies > identifies
2018-05-02luci-mod-admin-full: canonicalize configured static lease MACJo-Philipp Wich
When reading the configured mac address of the static lease, filter it through luci.ip.checkmac() to canonicalize and uppercase the value for mapping it against the combo box host hints. Fixes #1772. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-05-02Merge pull request #1705 from Mushoz/add-igmp-snoopingJo-Philipp Wich
luci-mod-admin-full: add igmp snooping option
2018-04-09luci-mod-admin-full: limit dns cachesize to 10000Marc Benoit
The value of cachesize is hardcoded to 10000 in dnsmasq-2.79/src/option.c to 10000 max case 'c': /* --cache-size */ { int size; if (!atoi_check(arg, &size)) ret_err(gen_err); else { /* zero is OK, and means no caching. */ if (size < 0) size = 0; else if (size > 10000) size = 10000; daemon->cachesize = size; } break; } Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com>
2018-04-09luci-mod-admin-full: allow setting dns cachesizeMarc Benoit
In the case of more powerful routers the default cachesize value == 150 is too small and can easily be extended to 1,000's and 10,000's of entries. It makes sense to make it easy configurable. Tested on Netgear R7800 Signed-off-by: Marc Benoit <marcb62185@gmail.com> Fix whitespace, edit the proposed help text. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-04-06luci-mod-admin-full: dispatch SimpleForm models using the form() actionJo-Philipp Wich
This fixes issues dicovered by check-controllers.sh Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-06luci-mod-admin-full: fix request path access in uci controllerJo-Philipp Wich
Fixes #1725 Fixes 731ed77c0 ("treewide: improve handling of page redirections in uci change views") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05luci-mod-admin-full: escape display parameterJo-Philipp Wich
Prevent reflected XSS through the reset button by url encoding the display parameter. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05treewide: improve handling of page redirections in uci change viewsJo-Philipp Wich
Instead of passing the full LuCI request url, pass the relative resolved request path instead and filter the received value through the lookup() dispatcher function to only allow paths to actual internal pages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05treewide: filter shell arguments through shellquote() where applicableJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-05luci-mod-admin-full: fix possible shell injection in bandwith statusJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-04-04luci-mod-admin-full: use strict hostname validation for dhcp hostsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-28luc-mod-admin-full: add igmp snooping optionJaap Buurman
Signed-off-by: Jaap Buurman <jaapbuurman@gmail.com>
2018-03-15Merge pull request #1654 from TDT-AG/pr/20180301-luci-several-fixesJo-Philipp Wich
luci-app-firewall/luci-base/luci-mod-admin-full: some fixes and improvements
2018-03-12treewide: unify mac address handlingJo-Philipp Wich
Use the new luci.ip MAC address facilities to parse and verify MAC addresses in a common way, instead of relying on various ad-hoc solutions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-02luci-base, luci-mod-admin-full: store backup vars in luci configurationJo-Philipp Wich
Keep the ifname and bridge state backup variables in /etc/config/luci to not pollute /etc/config/network. Fixes #1655. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-03-01luci-mod-admin-full: add hint on backup restoreFlorian Eckert
Add a hint to backup restore that files could remain on the system. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2018-02-04luci-mod-admin-full: prevent unknown sysctl key warnings on status pageJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-20luci-mod-admin-full: fix typos on dhcp pageHannu Nyman
Based on #1568 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2018-01-13luci-mod-admin-full: set 0 db DSL SNR offset by defaultMathias Kresin
If no DSL SNR offset is set for the dsl line the first entry from the dropdown list is pre-selected by default, which would apply a -10 db offset by default. Pre-select the 0 db option if nothing else is specified in the uci config files. Signed-off-by: Mathias Kresin <dev@kresin.me>
2018-01-09luci-mod-admin-full: led config: add support for Switch Port MaskMartin Schiller
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2018-01-09luci-mod-admin-full: fix incorrect length of DUID-LLArjen de Korte
The length of DUID-LL is 80 bits (16 bit DUID type, 16 bit hardware type, 48 bit mac) which corresponds to 20 nibbles. Also lower the minimum required length of DUID to 20 nibbles in order to allow entering a DUID-LL. Signed-off-by: Arjen de Korte <build+github@de-korte.org>
2018-01-09luci-base: adjust translationsJo-Philipp Wich
- Modify labels for mesh forwarding and 802.11b rate options - Synchronize translations - Complete german base translation Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-09luci-mod-admin-full: Add 802.11b legacy_rates supportSven Roederer
this was added to LEDE with ed62d91f4b5296a4aa883ce975d76f590ef4e910 and defaults to enable. Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
2018-01-09luci-mod-admin-full: Add mesh_fwding supportSven Roederer
* make it only visible for 802.11s mesh-networks * have it enabled by default Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de> [add empty line before meshfwd assignment] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-08luci-mod-admin-full: allow setting DSL SNR offset for VDSLJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-07luci-mod-admin-full: Add meshId supportKishan Gondaliya
Signed-off-by: Kishan Gondaliya <kishanpgondaliya@gmail.com> [move mode before the SSID / Mesh ID setting] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-03luci-mod-admin-full: remove unused button cbi modelJo-Philipp Wich
Remove the unused admin_system/buttons cbi model. It has been broken, was not exposed in the controller and the corresponding support code which only ever was available for the ath25 target has been dropped in with https://git.lede-project.org/0a3d721in June 2016. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-01-02luci-mod-admin-full: allow a wider range of DSL SNR marginsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-12-28typo: fileystem --> filesystemHannu Nyman
fix typo: sed -i "s/fileystem/filesystem/" Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2017-12-07Merge pull request #1452 from mkresin/masterJo-Philipp Wich
fix DHCPv6 hostname display
2017-12-04Fix bad argument #1 to 'tonumber'Brian J. Murrell
Fixes [FS#1118](https://bugs.lede-project.org/index.php?do=details&task_id=1118) Luci chokes on devices that do not have _iptables_ installed with: /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/'. The called action terminated with an exception: /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute firstchild dispatcher target for entry '/admin'. The called action terminated with an exception: /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute function dispatcher target for entry '/admin/status'. The called action terminated with an exception: /usr/lib/lua/luci/dispatcher.lua:460: Failed to execute template dispatcher target for entry '/admin/status/overview'. The called action terminated with an exception: /usr/lib/lua/luci/template.lua:97: Failed to execute template 'admin_status/index'. A runtime error occured: [string "/usr/lib/lua/luci/view/admin_status/index.h..."]:34: bad argument #1 to 'tonumber' (string expected, got nil) stack traceback: [C]: in function 'assert' /usr/lib/lua/luci/dispatcher.lua:460: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140> The code should be more defensive.
2017-11-17luci-mod-admin-full: indicate DHCPv6 hostname mismatchMathias Kresin
In case the DUID can be mapped to the MAC-Address of an already known host, show the already know hostname next to the DHCPv6 supplied one in case they differ. Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-17luci-mod-admin-full: always indicate missing DHCPv6 hostnameMathias Kresin
Don't show a DHCPv6 supplied hostname if none was send. It happens in case the DUID can be mapped to the MAC-Address of an existing host and the existing host has a name set. Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-17luci-mod-admin-full: don't replace DHCPv6 hostnameMathias Kresin
Don't replace the DHCPv6 supplied hostname if the DUID can be mapped to the MAC-Address of an already known host. It hides the issue of a missing DHCPv6 hostname and could lead to the conclution that the already known host has an IPv6 address. Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-11-10luci-mod-admin-full: add SNR tweak option to DSLAndrea Merello
Reported-by: Andrea Merello <andrea.merello@gmail.com> [rebase onto master, fix indentation, commit subject, depend on adsl mode] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-11-10luci-mod-admin-full: restrict DSL xfer_mode and line_mode options to VDSL modemsJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-11-10luci-mod-admin-full: add DUID option to static leases sectionJan Pavlinec
Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz> [add field validation] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2017-11-06luci-mod-admin-full: wifi.lua: 80211r ft_over_dsLorenzo Santina
Allow user to chose if use FT over DS protocol or FT over the Air protocol for Fast BSS Transition Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
2017-11-06luci-mod-admin-full: wifi.lua: 80211r ft_psk_generate_localLorenzo Santina
Add local generation of PMK when using a PSK. So 802.11r is easier to configure and no inter AP communication is needed any more. Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it>
2017-10-20Merge pull request #1365 from psyborg55/masterJo-Philipp Wich
luci-mod-admin-full: add fontsize style parameter
2017-10-18luci-mod-admin-full: tone down KRACK countermeasure descriptionJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>