15532 Commits

Author SHA1 Message Date
Jo-Philipp Wich
69d981aea3 luci-proto-ncm: rename service option to mode
Package luci-proto-ncm depends on comgt-ncm which uses an option
called 'mode' to set the radiomode of the modem. There is no option
'service' in the comgt-ncm scripts.

Suggested-by: breenstorm <49235337+breenstorm@users.noreply.github.com>
[fix commit subject, add commit message, rebase onto master branch]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4d6642b636a9feaa173c568c99f4129c440ed8b8)
2022-07-23 13:19:46 +02:00
Jo-Philipp Wich
1e7d9e4461 luci-base: form.js: fix removing just created named GridSection
Since the `handleModalSave()` handler of the GridSection class invokes
`handleModalCancel()` after saving the data but before removing the
`addedSection` property, the `handleModalCancel` handler incorrectly
removed the uci section that has just been created.

This bug didn't affect anonymous GridSections because after saving the
id of the created section changes, causing the remove command to fail,
but for named ones with stable section IDs, the bug manifested.

Solve the issue by passing a flag to `handleModalCancel()` indicating
whether the method was called from a safe operation and use it do
decide whether to delete the new staged uci section or not.

Fixes: #5760
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2771360108cb3e2011c7c9cb4921a9047ea70910)
2022-07-23 00:15:06 +02:00
Jo-Philipp Wich
df15ea39ff luci-base: uci.js: prevent sending empty uci set operations
Under certain circumstances, a staged uci option value might get unset
again before saving the config, leaving an empty section change set
behind, causing the save call to send an empty uci set request via rpc,
triggering an ubus code 4 (Resource not found) error.

In particular this prevented bridge VLANs from getting saved properly.

Fixes: #5876
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 25dcd0b77c4450b83cd8b8307397e58c34ebfcd1)
2022-07-23 00:14:38 +02:00
Jo-Philipp Wich
cd97091715 luci.mk: ignore language directories not explicitly mentioned
Only create translation packages for languages mentioned in luci.mk

Fixes: #5886
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-07-22 16:11:42 +02:00
Jo-Philipp Wich
f19d41cb14 luci-mod-network: demote WPA-PSK to "low" security in the choice list
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ef7fe79ffc4a0725d51eb554db02fd8e3e73534d)
2022-07-12 16:13:03 +02:00
Jo-Philipp Wich
e0f0502b22 luci-app-ddns: fix broken translation call
Fixes: #5874
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 57b88211c14dd71da44b537ac9062f99e1efbe80)
2022-07-12 15:45:01 +02:00
Jo-Philipp Wich
be3df7c2e2 lucihttp: update to latest Git HEAD
6e68a10 utils: also compare attribute name length in lh_header_attribute()
7b721af testcases: adjust urldecode tests

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2b0539ef9d1849b42fae206f0647bc647323c75d)
2022-07-08 15:29:19 +02:00
Markus Stockhausen
a57db983db rpcd-mod-luci: update filter for rpc_luci_get_network_devices
When kernel bonding module is loaded it will create a special
file /sys/class/net/bonding_masters. This is no network device.
Filter it out for getNetworkDevices() call.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
(cherry picked from commit 77d29c9dc0226faa9374ca25fba8dc642c99f303)
2022-07-08 15:29:10 +02:00
Alexander Georgievskiy
6731190ac8 luci-mod-status: nftables.js: fix OOM on big nftables IP sets
Signed-off-by: Alexander Georgievskiy <galeksandrp@gmail.com>
(cherry picked from commit 88c62fe2187ebf28937cb49f880dada09937b194)
2022-07-08 15:28:21 +02:00
Hannu Nyman
ee5576f5e3 treewide: backport and sync tranlations
Backport translations from master.
(also remove the erronenous Portuguese translations from English)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-07-03 13:37:08 +03:00
Jo-Philipp Wich
c4e1fcd458 treewide: sync with master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-21 23:58:54 +02:00
Jo-Philipp Wich
28d70baeaa luci-mod-network: wireless.js: fix typo in description string
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 53a998895b81ac393d1a9d62e4c3ae0e8708515b)
2022-06-21 23:55:21 +02:00
Jo-Philipp Wich
ac36cb549f treewide: sync with master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-06-21 12:30:45 +02:00
Jo-Philipp Wich
42cc1b402a luci-mod-network: wireless.js: expose wifi-iface macaddr option
Fixes: #5845
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f039069ac52e0da00ce9f3486926fbddd29a6ea0)
2022-06-21 08:57:41 +02:00
Jo-Philipp Wich
b528725635 luci-base: remove redundant english translations
Drop translations that match the msgid as well as stry, misplaced spanish
ones.

Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/50
Ref: https://forum.openwrt.org/t/openwrt-22-03-0-rc4/129874/60
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit cc3d97ccecec041128462d44d85f9393a502f60e)
2022-06-20 11:25:41 +02:00
Jo-Philipp Wich
8a4486a792 luci-base: network.js: consider uci config for Device.getType()/getParent()
For network devices declared in uci but not yet created by netifd, the
runtime status information will be unavailable, causing methods such as
`getType()` to assume plain ethernet interfaces and `getParent()` to fail
resolving parent devices.

Fall back to infer the information from uci configuration settings in such
cases to give accurate type hints to callers.

In particular, this prevents LuCI from turning wireless target networks
containing a to-be-created bridge device into bridges themselves.

Fixes: https://github.com/openwrt/packages/issues/18768
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8effea58d7281fd4f2b6c31d534195dba27a850b)
2022-06-16 09:53:14 +02:00
Hannu Nyman
2b78a18d7b treewide: Backport translations and sync
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-06-12 19:51:16 +03:00
Jo-Philipp Wich
28e92e3f8c luci-app-opkg: fix parsing package dependencies with version constraints
Due to improper ordering of regexp alternatives, version constraint operators
might get undermatched.

Fixes: https://github.com/openwrt/openwrt/issues/9982
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b84791bd029c2aaa67cbc06a15d23828f62f4608)
2022-06-03 13:38:01 +02:00
Dirk Brenken
69cbdb87e0
luci-app-banip: mark as broken
banIP 0.7.x is not compatible with new nft firewall (default in master and 22.03).
Mark the package as BROKEN for now.

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 8837f7608adf770ff33249821d28da097324c54d)
2022-05-27 21:32:44 +02:00
Jo-Philipp Wich
d8ecf48f20 luci-theme-bootstrap: restore initramfs warning
Restore accidentally removed the initramfs boot warning banner.

Ref: 8055acc9be (commitcomment-73447330)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 56fab648caa78422aac47ab8cec168e8a0999316)
2022-05-21 18:27:45 +02:00
Jo-Philipp Wich
ef99568d88 luci-base: ui.js: warn about connectivity loss on changing iface settings
If specific settings such as the protocol, IP address or netmask of an
interface the user is connected to are changed, the apply/rollback
mechanism might interfere. Display an additional warning dialog in this
case, instructing the user to manually reconnect and offering to continue
with a less safe unchecked apply mechanism.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 733ee9a7b6312e9b5fe2a4aa8107baf5379602ab)
2022-05-20 20:24:28 +02:00
Jo-Philipp Wich
ea5f85f3f0 luci-base: ui.js: make "Apply unchecked" available from the changes dialog
Previously, "Apply unchecked" was only possible from the save action of CBI
maps, allow to invoke it from the configuration change dialog as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8583efb5a92785fd56ff4abb0ce56a142eb6602f)
2022-05-20 20:24:27 +02:00
Jo-Philipp Wich
514a459b9b luci-base: ui.js: gracefully handle failing confirm calls on rollback
Do not abort the poll loop if some confirm request attempts fail, which
might happen when the device starts rolling back its configuration.

Before that fix, the rollback information dialog offering an unchecked
apply was not reliably presented in such situations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit b6797821b86678d8dd604ce4805691784e6dc3ce)
2022-05-20 20:24:27 +02:00
Jo-Philipp Wich
e57aaf808d luci-theme-bootstrap: use medium dark text color for version footer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c40dd71b84f291ad0db0f28670e1e3979a4c51b0)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
07cf1a33a2 luci-base: fix DSL feature detection
On boards with ADSL instead of VDSL support we need to expect an
`/sbin/dsl_cpe_control` instead of an `/sbin/vdsl_cpe_control` executable.

Ref: https://forum.openwrt.org/t/dsl-line-stats/126580
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 111c551cdb8d14e8e5ef7c7a66ffdceb6d3cbb55)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
ec7cadc37e luci-mod-network: routes: allow prefixes as route source
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 904c174cafe46a6414058d242df279c09e23be29)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
02913bef60 luci-mod-system: enforce availability of english as language choice
Always offer english, regardless of whether a dummy language pack for it
is installed or not.

Fixes: #5783
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c2eb30bba7451d16e1de37411624b2bcc449c037)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
f777bf78c1 luci-mod-network: diagnostics: peg max traceroute hops to rpc timeout
In the worst case, traceroute might take up to 30s to complete when tracing
a completely unreachable path, due to the default limit of 30 hops multiplied
by the per-hop deadline of 1 second (-w 1).

Limit the maximum amount of hops to the configured rpc execution timeout,
20 second by default, in order to avoid running into timed out rpc requests.

Fixes: #5782
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1ae142d7d11862b11a6e0cea06562875cc778ae7)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
3886866ad6 luci-mod-status: hide iptables firewall status when nft is present
Do not expose the iptables status page as menu item when nftables is present
on the system. Instead add a warning banner to the nftables status page
directing the user to the hidden iptables status page when we encounter
legacy rules on the system.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2f80fe3767207e2dbb8c5286603f49808b66a60d)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
f29452ced0 luci-base: dispatcher.lua: support "absent" fs dependency for menu nodes
The "absent" dependency type requires the given path to not exist on the
local system for the condition to be satisified. This is useful to disable
menu nodes depending on the presence of specific files.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2e4b5fb8ff2fb3bfd1400bf7cbf721057f02fab9)
2022-05-20 20:23:26 +02:00
Chen Minqiang
272611d74e luci-mod-network: switch: Fix multi instances handling
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit d65c5e64960273939e05e615cdcfe9019c1e2f37)
2022-05-20 20:23:26 +02:00
Jo-Philipp Wich
791e458a77 luci-mod-status: nftables: add translations for further expression kinds
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f2f7e0c1f71199f945e4f936bb1396e0c1f30b33)
2022-05-20 20:23:26 +02:00
Hannu Nyman
b8e6cdda04 treewide: Backport translations and sync
Backport from master, sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-05-15 20:12:41 +03:00
Jo-Philipp Wich
c55e75b03a
Merge pull request #5805 from odmdas/2203-sysntpd-iface
[22.03] luci-mod-system: add interface selection for NTPD
2022-05-10 11:04:27 +02:00
Alexey Dobrovolsky
26fcbd5df2 luci-mod-system: add interface selection for NTPD
UCI option `interface` for sysntpd server was introduced in
OpenWrt commit 4da60500ebd2. NTP server binds to the specified interface,
or if unspecified, to all.

This patch adds selection widget to LuCI.

Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>
(cherry picked from commit 24ac5a2bf6d713c6878cf7be7d4e4516965c2884)
2022-05-10 03:05:31 +03:00
Jo-Philipp Wich
66994a580e luci-base: sys.lua: fix parsing conntrack entries without timeout
Flow offloaded conntrack entries carry no timeout value and trip up the
record parsing routine. Adjust the code to properly deal with such entries.

Ref: https://forum.openwrt.org/t/offloading-breaks-connections-list/126423
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 531c0ecff2ca57c4bc0aacee66a0746814fefc78)
2022-04-29 12:18:35 +02:00
Jo-Philipp Wich
4c263cff5c luci-mod-network: avoid needlessly writing none RA flags
Fixes: #5725
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f04011f0683dbacb8b831733c708bad760ca61df)
2022-04-27 12:20:07 +02:00
Jo-Philipp Wich
46794ea2fb luci-app-statistics: stat-genconfig: don't emit bools for absent uci options
Do not emit native collectd.conf boolean false options if the corresponding
uci option is unset in order to honour collectd's implicit defaults.

This fixes certain options, such as the memory plugins `ValuesAbsolute`,
being without effect if declared as default-enabled in the related plugin
uci forms.

Fixes: #5777
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f16037cec5e3f65cffe2f5788c264f1912435b0e)
2022-04-25 21:00:20 +02:00
Hannu Nyman
3645670952 treewide: Backport translations from master - i18n
Backport translations.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-04-24 18:33:21 +03:00
Florian Eckert
990aa4fc6b luci-proto-wireguard: adjust MTU range from 0-8940
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 7206d8fd6aac0708dda6ac17c96709e066f6328b)
2022-04-14 12:04:32 +02:00
Florian Eckert
9c862a41ea luci-proto-wireguard: remove MTU limit
fixes #5737

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit ddd04a719f3adf4c59d6ab153de0c26eb9495a93)
2022-04-14 12:04:21 +02:00
Florian Eckert
0c0cf782f3 luci-mod-system: Set description to blank if the trigger has none
In this case the cbi description div will not be generated and when
switching to another trigger later, attempts to change the description
div contents will fail.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit b6fb2b16971f80afcfb7c3dd1d257c60f6cced7f)
2022-04-12 14:20:06 +02:00
Florian Eckert
0dedf21108 Revert "luci-mod-system: Set description to blank if the trigger has none"
This reverts commit 3de544600385ca365c833aec99f89113daa12292.

I have unfortunately edited the wrong line!

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 2135525b7213220476388fbed0d7525df712a937)
2022-04-12 14:19:57 +02:00
Florian Eckert
ba7d0c7ddd luci-mod-system: Set description to blank if the trigger has none
In this case the cbi description div will not be generated and when
switching to another trigger later, attempts to change the description
div contents will fail.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 3de544600385ca365c833aec99f89113daa12292)
2022-04-12 10:13:38 +02:00
Hannu Nyman
0e4eeeb9a2 treewide: Backport translations and sync
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-04-09 19:14:45 +03:00
Justin Klaassen
751334571d luci-lib-jsonc: stringify int use json_object_new_int64 instead
Fixes: #3293
Signed-off-by: Justin Klaassen <jck112@users.noreply.github.com>
(cherry picked from commit 45f411b7a29d0aa6b46946f06bd88082f2a68034)
2022-04-07 19:12:01 +02:00
Jo-Philipp Wich
162defebe9 build: introduce official way to opt out of source minification
Introduce three new default enabled variables `LUCI_MINIFY_JS`,
`LUCI_MINIFY_LUA` and `LUCI_MINIFY_CSS`  that allow LuCI component
Makefiles to opt out of JavaScript, Lua and CSS compression respectively.

To e.g. inhibit CSSTidy postprocessing in a theme, the corresponding
Makefile can set `LUCI_MINIFY_CSS:=0` prior to including `luci.mk`.

Fixes: #5755
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3646b0cd1f65dc929dbc0b29daaa7252f6a2507b)
2022-04-06 11:42:44 +02:00
Florian Eckert
43acd5e3ab
Merge pull request #5750 from MaxSKash/22.03-DHCP-lease-table
[22.03]luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
2022-04-05 14:04:06 +02:00
Max S Kash
66d9387eb3
luci-mod-status,mod-network: Added fqdn-name to DHCPv4 lease table
Added code to display fcdn-name in DHCPv4 lease table.
(based on code in DHCPv6 lease table)

Signed-off-by: Max S Kash <asukms@ya.ru>
Indentation adjused and wrapped commit message
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2022-03-31 00:09:15 +05:00
Jo-Philipp Wich
7e3c1b4dbf luci-app-firewall: fix misspelling of restrictions
Fixes: #5749
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0eb3aeb0105be5477ed12a57ce3028d08d5f90c6)
2022-03-30 20:46:03 +02:00