3628 Commits

Author SHA1 Message Date
Jo-Philipp Wich
d744c54220 luci-mod-network: allow sorting static leases
Fixes: #5453
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f4f64b91ca4d443af9e7bc0dfc2565ae0a796ea3)
2021-10-19 23:14:22 +02:00
Jo-Philipp Wich
68815c88b0 luci-mod-system: fix time display logic
Use the system/info ubus call to obtain a TZ adjusted epoch value and
format the date time string manually instead of relying on the browsers
local representation.

Fixes: #5454
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 07569c5af23d74bad8b78905b25d7e85bd2d3141)
2021-10-19 23:11:16 +02:00
Hannu Nyman
790bb936f2 treewide: Backport and sync i18n translations
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-19 22:22:39 +03:00
Jo-Philipp Wich
4fd8c836b3 luci-base: sysauth.htm: switch https detection URL
The `up.gif` icon is not present by default anymore, it has been moved to
luci-compat. Probe loading.gif instead which is guaranteed to be available
by default.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ea9b5e87e6ec3fbab52a02ab5f18bb51292bd249)
2021-10-12 23:05:22 +02:00
Jo-Philipp Wich
62d45da4a5 luci-base: dispatcher: fix null access on dispatching unknown urls
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4d28c390ab181636b101a17203b2db3391784687)
2021-10-12 23:05:16 +02:00
Jo-Philipp Wich
cfd0bdd206 luci-base: form.js: add drag-drop sorting support for mobile
Fixes: #5416
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit df75163e6842efc553ad8dcaedf06ea64570ed95)
2021-10-12 23:04:25 +02:00
Jo-Philipp Wich
48b829616e luci-mod-network: fix disabling 11w MFP for WPA3
Fixes: #5394
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0b49ed45c6e9f4bc10abdcea392125aec3794e58)
2021-10-12 23:04:02 +02:00
Ansuel Smith
06419e9a9c luci-mod-status: fix wrong logic for maclist adding feature
Currently any new entry added to the black/whitelist deletes the
others. Fix this and improve the rule apply by firstly disconnect
the wifi client.

Fixes: #5343

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 085c4a08f5bf50919731304a962cfcd2b592d523)
2021-10-12 23:03:33 +02:00
Ansuel Smith
2fe3d0ab4a luci-mod-status: cosmetic fix for isWPSEnabled in wifi status
Drop isWPSEnabled table as it's really not needed and can directly
included in the network table.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 2a97d5533cba419f51da0b550b00a34bc9f50cce)
2021-10-12 23:03:29 +02:00
Vladislav Grigoryev
9da9d65c35 luci-mod-network: fix option ip6table in network/interfaces
Fix the incorrectly displayed value for the option "ip6table".

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 3ebdf51f9b2e713cd655c0f97f2542c96736cae5)
2021-10-12 23:02:45 +02:00
Jo-Philipp Wich
5806ff0531 luci-base: fix off-by-one in cbi_update_table()
Fixes: #5189
Fixes: f919635310 ("luci-base: batch DOM updates to prevent slowdown")
Ref: f919635310 (commitcomment-53495580)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7d9ab8d4a741cbc97e9553982e9e352b21ddf5f3)
2021-10-12 23:01:45 +02:00
Olli Asikainen
d7be4983cf luci-base: batch DOM updates to prevent slowdown
Signed-off-by: Olli Asikainen <olli.asikainen@gmail.com>
(cherry picked from commit f919635310286b3b905aedb716d707da1ea2c811)
2021-10-12 23:01:35 +02:00
Jo-Philipp Wich
0ac19f6a85 luci-mod-network: fix 60GHz radio frequency configuration
Fix incorrect minimum 60GHz frequency value and ensure that a 60GHz band
choice option is available once corresponding channels are found on the
system.

Ref: http://lists.openwrt.org/pipermail/openwrt-devel/2021-July/035810.html
Suggested-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e5626ece12236f6be9dbb6da6eb90fcbb469a1f0)
2021-10-12 23:01:29 +02:00
Jo-Philipp Wich
16e807edc9 luci-mod-network: dhcp.js: don't fail on not existing interface
Fixes: #5177
Fixes: 7e56289538 ("luci-mod-network: improve static DHCP lease validation")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f57d20bffffda026ab203d328a859a3f38c0c8d0)
2021-10-12 23:01:23 +02:00
Jo-Philipp Wich
8b02f53a37 luci-mod-network: fixes to DHCP lease validation
- validate current form value IP instead of stored uci one
 - ensure to not pass non-string values to the validator
 - remove leftover debug code
 - simplify obtaining formvalues

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 9d15a4e70c10a43911c7f9d48240a01c23eb81b6)
2021-10-12 23:01:00 +02:00
Jo-Philipp Wich
e8b8a9be64 luci-mod-network: improve static DHCP lease validation
- Ensure that MAC addresses are unique within the same pool
 - Ensure that IP addresses are globally unique
 - Ensure that IP addresses are within any DHCP pool range

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7e562895380d6bbe89ed88fe7576272c078f3b59)
2021-10-12 23:00:52 +02:00
Michael Pratt
f0ba6c8475 luci-mod-network: do not remove enable_vlan from config
There are many switch drivers where VLAN functionality is enabled by default.
In this situation, LuCI cannot be used to disable VLAN functionality,
because removing the line from configuration results in VLAN remaining enabled
by the driver.

When enable_vlan is set to 0 by default
by using functions in board.d,
and an unrelated change is made on the Switch webpage,
then the enable_vlan option gets deleted when changes are saved.

Therefore, the option needs to be preserved, whether set to 0 or 1.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
(cherry picked from commit 51ab737a4ba2b0f2a9d479cf114837c570f8d05c)
2021-10-12 23:00:10 +02:00
Hannu Nyman
e10e960b4d treewide: i18n - Backport translations
Backport translations from master.
Sync.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-10-05 21:53:09 +03:00
Jo-Philipp Wich
b613f3a2ae luci-mod-network: fix name of network.device.isolate uci option
Fixes: #5383
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e0053fe79d7c2167298907b06f161795f9c38031)
2021-09-23 17:34:41 +02:00
Hannu Nyman
efb535e5c7 treewide: i18n - Sync, backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-23 18:19:52 +03:00
Hannu Nyman
f24d61dd49 treewide: i18n - Backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-09-09 18:01:47 +03:00
Vladislav Grigoryev
d9a228ec4a luci-mod-network: fix route6 source autocomplete
Fix the wrong value for the "source" option of the "route6" section.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 8b4015036d6f298cbfe0291ab8fdc23b4133cca7)
2021-08-31 09:00:35 +02:00
Hannu Nyman
3c115cddd4 treewide: i18n - Backport translations, sync.
Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-25 20:22:45 +03:00
Vladislav Grigoryev
422c1752a6 luci-base: support loopback by widgets.NetworkSelect
Support the "loopback" interface by "widgets.NetworkSelect".
Enable the "loopback" option to include this interface.
Can be used to configure interface binding for services.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
(cherry picked from commit 376af36975579008e3176a860ae032759d27dcbb)
2021-08-19 09:17:21 +02:00
Ansuel Smith
c3580ee68f luci-mod-system: hide unsupported option on flash.js
Hide unsupported option when /rom is not used in flash.js

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

(cherry picked from commit 82035eec6150fef1319e6fcec324124f82ada754)
2021-08-18 20:46:04 +03:00
Ansuel Smith
6389826039 luci-mod-system: improve sysupgrade page
- Add missing -k and -u option from sysupgrade page.
- Fix missing check for image verification exit code
- Provide the actual reason of the image verification

Fixes: #4160

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

(cherry picked from commit 0f4f6e89f15aa1dac0bfd676cb8364ef0b6c6e1f)
2021-08-18 20:45:18 +03:00
Florian Eckert
854399a329 luci-mod-battstatus: chmod battstatus.js to 644
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 7f5751c16f9c883728ab67cab8b3c717aaf6a590)
2021-08-17 12:11:14 +02:00
Florian Eckert
630a5755ed luci-mod-battstatus: fix quotation marks
Fixes output on i18n generation:
standard input:56: warning: RegExp literal terminated too early

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 7e1e83fcb8b3e4229dd1bf9218e1b256f81deda6)
2021-08-17 12:11:03 +02:00
Hannu Nyman
98e8ded2a9 treewide: i18n - Sync and backport translations
Sync translations.
Backport translations from master.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-08-10 22:08:54 +03:00
Jo-Philipp Wich
119701cce3 luci-mod-network: fix legacy_rates option dependency
The recently introduced band option support changed the internal frequency
selector choice values, breaking the legacy rates option dependency.

Fixes: #5234
Fixes: 0829d31290 ("luci-mod-network: support newer wireless.wifi-device.band option")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fd2e755b6f30d80ffdf15536669fdb739212ac96)
2021-08-09 19:44:22 +02:00
Hannu Nyman
1dd9ca363d treewide: i18n - Backport translations
Backport translations from master.
Sync translations.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2021-07-22 00:30:08 +03:00
Jo-Philipp Wich
de8bc46aec luci-mod-system: reload crond upon saving crontab
Fixes: #5184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8d4ac60f7a02e5c8e3d186f4009b4696b098152d)
2021-07-15 11:59:56 +02:00
Florian Eckert
e52e1de53a luci-base: do not add validation for named section if readonly is set
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 1a2b7fef6cc181f7f0ff0e1133ad4d8ab03e279c)
2021-07-07 17:18:19 +02:00
Helge Mader
56f453ad13 luci-base: prevent empty field for adding new named section in JavaScript
Suggested-by: Helge Mader <ma@dev.tdt.de>
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 87215e3d1bd2406c4a5ae5088e176fb4aefbe546)
2021-07-07 17:18:16 +02:00
Florian Eckert
215a3141f0 luci-base: change css class btn to cbi-button
The css class btn is only a valid input element on lua rendered pages.
Use instead cbi-button for javascript rendered pages.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 80262bb9a7e63eeee0e1fa5f290b27a569a644bf)
2021-07-07 17:18:13 +02:00
Florian Eckert
c6b41bdecb luci-base: use button tag instead of input tag on named section add
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 97e673b72cc96f5f866df7e990a51fa65bff5b5f)
2021-07-07 17:18:10 +02:00
Jo-Philipp Wich
eafe171160 luci-mod-status: disable "Set static" lease action on readonly view
Fixes: f6b6a12927 ("luci-mod-status: add support for one-click static lease")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a6d957d6f59329cc16c838afe3c88c6072fad236)
2021-07-07 17:17:16 +02:00
DeYu Liu
720a57647b luci-base: Fix time display error
Signed-off-by: DeYu Liu <vito_sam@outlook.com>
(cherry picked from commit 0e4b4c5b42f9d8b93a4936c4b2d63f9a90c5a61b)
2021-07-07 17:17:09 +02:00
Jo-Philipp Wich
1fed9af22c luci-base: validation: disallow mutlicast MACs by default
Extend the MAC address validator to disallow multicast MAC addresses and
add a new optional validator option to require multicast MACs instead of
unicast ones.

Fixes: #5166
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 00e41c3c4977f75e6ca43429dd4c8c2f5cb22419)
2021-07-07 17:17:02 +02:00
Jo-Philipp Wich
afea1dac74 Revert "luci-mod-network: issue with breakdown of dnsmasq after duplication of static IP was fixed"
This reverts commit 463e910119813aaea0755ff5c16c91ce412a8cbb.

This change causes the entire static lease to get deleted when attempting
to change the MAC address.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 91f46d765b36825fcfe63e2b7d4863de00cdc69d)
2021-07-03 07:21:24 +02:00
Jo-Philipp Wich
0ededb9bcc luci-mod-network: fix saving bridge VLANs without member ports
Calling `uci.set()` with an empty array yields an invalid argument error,
make sure to pass `null` instead in this case.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f1f566bfe2a6b0960ba95a5ea05ca4353b766867)
2021-07-02 20:48:09 +02:00
Jo-Philipp Wich
ae00d0f712 luci-mod-network: work around jsmin bug
The jsmin minifier incorrectly transforms the expression `/\*/.test(...)`
into `/\* /.test(...)`, causing the VLAN filter dialog to not recognize
PVID settings in the configuration.

Work around the issue by using an equivalent `\x2a` escape sequence instead.

Ref: https://forum.openwrt.org/t/x/99222/28
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2869c9cf324a9e057567075d4977c7cc40140938)
2021-07-02 20:48:09 +02:00
Jo-Philipp Wich
f66be1fe72 treewide: fix typo in "Enable VLAN filtering" label
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit c48d8f4a2c9a771c8c03a76eb1b554f62d57140b)
2021-07-01 21:16:56 +02:00
Jo-Philipp Wich
d1d452ed2f luci-mod-status: don't set '-' hostname when creating static lease
Fixes: #5153
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e3357deb7d273b6a982dfaf9800c83eba85fe6b2)
2021-07-01 21:15:25 +02:00
Jo-Philipp Wich
49aa9c61db luci-mod-network: enforce IPv4 mode for traceroute call
Recent busybox traceroute applet versions support both IPv4 and IPv6 and
default to IPv6 when running a route trace to an IPv6 enabled target
host. Pass the `-4` flag to enforce IPv4 mode in this case.

Fixes: #5155
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c4f429461545d1401429e7ba133f24a55d1015b6)
2021-07-01 21:15:15 +02:00
Jo-Philipp Wich
165e411cd4 luci-mod-network: parse ports without tag/pvid annotation as well
Fixes: 01eac366f6 ("luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e57f8663afd53cc7421debcd63444e1d136f5dec)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
4c05263573 luci-mod-network: fix tagging/pvid state parsing in bridge-vlan ports
The previous code naively looked for a `t` in the entire port spec,
wrongly matching untagged ports having a `t` in their name, such
as `eth0`.

Rework the logic to be more strict when parsing the port member
specification to avoid this issue.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 01eac366f69ba58c090ddc2cb70aeb069adbdd5a)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
ccf7c1e036 luci-mod-network: refactor device configuration
Since all netifd device types inherit generic device settings, we can
simplify various aspects of the device configuration ui and drop unused
code while we're at it.

 - Remove setIfActive() helper, superseded by commit
   f3f74bd0fe ("luci-base: form.js: consider aliased options in AbstractValue.remove()")

 - Remove most dependency constraints to make all generic device settings
   available for all device types

 - Add MTU value validation to disallow exceeding parent device MTU for
   VLAN interfaces

 - Dynamically update placeholder values when changing base or parent
   device options

 - Undo VLAN network config hack since all options are available now.
   Reverts commit
   3c6b59504a ("luci-mod-interfaces: simplify configuring MAC address of 802.1q devices")

 - Do not suggest inactive wireless networks as existing device or base
   device choices

 - Disallow specifying names of already existing network devices when
   creating new device settings

 - Fix a number of multicast dependency specifications

 - Drop now unused functions

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f689d0d208acbf9934da5a2d49c8717c054be585)
2021-07-01 21:15:04 +02:00
Jo-Philipp Wich
0eb87ea65e luci-mod-network: change port status layout in vlan filter config
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 36350e9867ca9fd2f9b137ed76f0fabe0e57c880)
2021-07-01 21:15:04 +02:00
Florian Eckert
74c16549a1 luci-base: i18n sync translations
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2021-06-21 13:53:03 +02:00