Commit graph

14754 commits

Author SHA1 Message Date
Florian Eckert
eee3d4bef4 luci-app-nlbwmon: move into menu entry into service section
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 9e91737566)
2021-06-21 12:03:06 +02:00
Jo-Philipp Wich
d365470f66 luco-app-ksmbd, luci-app-omcproxy: use relative luci.mk include path
Fixes: #5134
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 2f0ffd9d82)
2021-06-18 14:29:20 +02:00
Jo-Philipp Wich
8b663587f9 luci-mod-network: only consider bridge vlans belonging to the current device
In case multiple bridges with bridge vlans are declared, LuCI did not
correctly filter the VLANs to show only the ones belonging to the
bridge being configured currently.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f6f1eacb01)
2021-06-17 09:39:38 +02:00
Yu Hua
83f6606a6d luci-lib-docker: add container export support
commit from https://github.com/lisaac/luci-lib-docker

Signed-off-by: Yu Hua <hue715@gmail.com>
(cherry picked from commit fe795d5278)
2021-06-16 14:52:05 +02:00
Jo-Philipp Wich
199533a08e treewide: resync and merge master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-15 10:06:26 +02:00
Jo-Philipp Wich
5ca9e86cbf rpcd-mod-luci: bump version
Fixes: a78b74784d ("rpcd-mod-luci: refactor host hint gathering")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a26b53314d)
2021-06-15 10:03:22 +02:00
Jo-Philipp Wich
e0a32b2749 rpcd-mod-luci: refactor host hint gathering
- Do not incorrectly put the IP addresses from the rrdns reply into the
   first hint, instead distribute hostnames to the appropriate hints.

 - Avoid returning stale lease information from previously parsed records
   by clearing the static struct before each parse attempt.

 - Improve existing checks for empty MAC addresses and unspecified IPv6
   addresses.

Fixes: #5126
Fixes: 87bcf9e923 ("rpcd-mod-luci: Return array of addresses in getHostHints")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a78b74784d)
2021-06-14 21:53:32 +02:00
Jo-Philipp Wich
2778366916 luci-mod-network: wireless.js: recognize HE* htmodes
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=3856#comment9797
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 4286c84825)
2021-06-14 09:06:39 +02:00
Dirk Brenken
467b8535ae
luci-app-banip: sync with banip 0.7.9
* support the new 'ban_fetchinsecure' option
* improve the chain help text to make clear that you can assign
  multiple FW chains

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit 770548eadf)
2021-06-14 06:42:32 +02:00
Dirk Brenken
4c8ab04dcc
luci-app-adblock: sync with adblock 4.1.3
* support the new 'adb_fetchinsecure' option

Signed-off-by: Dirk Brenken <dev@brenken.org>
(cherry picked from commit be578c64e9)
2021-06-14 06:40:40 +02:00
Jo-Philipp Wich
bd36169e8c luci-theme-bootstrap: mobile style fixes for vlan filter matrix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e6a2cdbdab)
2021-06-13 21:50:18 +02:00
Jo-Philipp Wich
1397a1b72e luci-mod-network: small styling fixes for vlan filter matrix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit cbf2cc396a)
2021-06-13 21:48:27 +02:00
Rafał Miłecki
4dff25448a luci-mod-network: migrate more device options
Include mtu and igmp_snooping while migrating.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit fa51d04459)
2021-06-13 20:12:19 +02:00
Jo-Philipp Wich
655d522a42 csstidy: update to latest Git HEAD
707feae parse_css: do not omit white space in url() property values

Ref: 6960819997 (commitcomment-52088358)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e266c74903)
2021-06-13 19:56:32 +02:00
Jo-Philipp Wich
973e80e97e luci-mod-network: reset bridge VLANs on cancelling modal dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bb3269945c)
2021-06-12 22:55:38 +02:00
Jo-Philipp Wich
7f15982c25 luci-mod-network: fix vlan filter matrix overflow after redraw
Ensure that the overflow styles are reapplied after a redraw. This also
simplifies the code as a side-effect.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7a781d9cd8)
2021-06-12 22:10:15 +02:00
Jo-Philipp Wich
c7ee2c1141 treewide: resync and merge master translations
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
12b5dd9ff3 protocols: unify TOS and TTL description strings
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit b4c394f2d2)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
6c6559ad05 treewide: consolidate {IPv4,IPv6,MAC} {address,gateway} spellings
- Turn IPv4-Address into IPv4 address
 - Turn IPv4-Gateway into IPv4 gateway
 - Turn IPv6-Address into IPv6 address
 - Turn IPv6-Gateway into IPv6 gateway
 - Turn MAC-Address into MAC address

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 88b9d84388)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
003f367e8d treewide: fix "promiscious" typo
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit b5832d134e)
2021-06-12 20:01:58 +02:00
Dirk Brenken
ca66b630c0 luci-mod-system: remove bogus btn class in flash.js
* fixes #4970

Signed-off-by: Dirk Brenken <dev@brenken.org>
[omit translation sync]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 8c6a29a45c)
2021-06-12 20:01:58 +02:00
Wojciech Jowsa
7abec3b04f luci-mod-status: check if center_chan1 is defined
Signed-off-by: Wojciech Jowsa <wojciech.jowsa@gmail.com>
(cherry picked from commit ead64c0195)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
2afd4b78c8 luci-theme-openwrt-2020: rework table styles
Target table, tr, th and td tags directly and stop using the corresponding
CSS class names.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7057108400)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
d3971680ee luci-mod-network: add port status to bridge vlan filter matrix
Also ensure that port devices are ordered numerically.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8c71b1d01e)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
ba57ec5fd5 luci-base: network.js: add link status information accessors
Fixes: #5121
Fixes: 8c71b1d01e ("luci-mod-network: add port status to bridge vlan filter matrix")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1bcb12570c)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
55b3ed0833 lucihttp: update to latest Git HEAD
Fixes compilation under 32bit systems by using the proper printf format
specifier for size_t values.

Also fixes compilation with Ninja by appending instead of
overwriting CMAKE_OPTIONS.

Fixes: #5116
Suggested-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d1fc11d852)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
aea75e6593 rpcd-mod-luci: add link details to ubus netdev information
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 113c0b0d26)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
d49c6d46e6 luci-mod-network: fix horizontal scrolling in the bridge vlan filter matrix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit ded6e53bcd)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
0df73ee571 luci-base: ui.js: determine dropdown position relative to overflow parent
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e3bf521edb)
2021-06-12 20:01:57 +02:00
Lukasz Baj
4243e21f13 luci-mod-status: fix NaN errors in realtime graphs
When I use Realtime Graphs I see following NaN errors:

    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    wireless.js?v=git-21.105.40538-2da37c2:19 Error: <polyline> attribute points: Expected number, "0,298 0,NaN 5,NaN 10,NaN…".
    eval @ wireless.js?v=git-21.105.40538-2da37c2:19
    Promise.then (async)
    eval @ wireless.js?v=git-21.105.40538-2da37c2:8
    step @ luci.js?v=git-21.105.40538-2da37c2:91
    start @ luci.js?v=git-21.105.40538-2da37c2:87
    add @ luci.js?v=git-21.105.40538-2da37c2:82
    pollData @ wireless.js?v=git-21.105.40538-2da37c2:7
    render @ wireless.js?v=git-21.105.40538-2da37c2:24
    Promise.then (async)
    __init__ @ luci.js?v=git-21.105.40538-2da37c2:148
    super @ luci.js?v=git-21.105.40538-2da37c2:22
    Anonymous42Class @ luci.js?v=git-21.105.40538-2da37c2:12
    (anonymous) @ luci.js?v=git-21.105.40538-2da37c2:181
    Promise.then (async)
    compileClass @ luci.js?v=git-21.105.40538-2da37c2:177
    Promise.then (async)
    require @ luci.js?v=git-21.105.40538-2da37c2:183
    instantiateView @ ui.js?v=git-21.105.40538-2da37c2:311
    (anonymous) @ wireless:47
    Promise.then (async)
    (anonymous) @ wireless:46

Signed-off-by: Lukasz Baj <l.baj@celerway.com>
[adjust subject]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c6a5c809ed)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
a648b36372 luci-mod-network: interfaces.js: fix ifname migration in device sections
The migration code attempted to add new device sections instead of moving
the ifname option to a ports list within the existing ones.

Fixes: #5108
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e13d82a202)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
da2eefe94b luci-mod-network: interfaces: show bridge port device icons again
Restore the display of bridge port device icons in the interface overviews.
This feature has been lost after migrating the network config from legacy
bridge declarations to device bridge declarations.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 608f89429b)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
ab7717b2b4 luci-mod-network: support newer wireless.wifi-device.band option
OpenWrt switched from "option hwmode" to "option band" in order to select
the frequency band to use for the radio phy.

Extend the channel selector to recognize and use an existing "option band"
to select the appropriate channel list. When operating upon a wireless
configuration still using "option hwmode", then translate it to a band
value internally and translate it back to "option hwmode" on save.

This should provide forward- and backwards compatibility with both current
OpenWrt master and older versions still using hwmode.

Fixes: #5106
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 0829d31290)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
b9b279c4cc luci-mod-network: allow device declarations and device configs to coexist
It is legal to have two device sections referring to the same netdev if one
section is a declaration (a section setting option type) and the other is
a configuration (a section not specifying a type but matching an existing
netdev).

Support this case in LuCI since it might be required for some complex
device setups.

Additionally, fix the device type determination for device configuration
sections without type, those should be treated as ethernet (a.k.a.
simple device) configuration instead of falling back to the underlying
netdev device type.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a6c0ad00b2)
2021-06-12 20:01:57 +02:00
David Bauer
d721bb6875 luci-base: add 11ax HW / HT modes
Add the known values returned for 802.11ax HW as well as HT modes to the
respective method descriptions.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 4b17f8baa3)
2021-06-12 20:01:57 +02:00
David Bauer
1af323e450 luci-mod-network: add 802.11ax HE support
This commit adds the ability to configure HE-modes for radios
(HE20 / HE40 / HE80 / HE160) as well as HE rate information in the
assiciation view.

Tested-on: Ubiquiti UniFi 6 Lite / LR

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit f35e877dc6)
2021-06-12 20:01:57 +02:00
Jo-Philipp Wich
e8dd9331c1 luci-mod-interfaces: simplify configuring MAC address of 802.1q devices
Treat not explicitly configured, preexisting VLAN interfaces as simple
network devices when adding configuration for them, since it is more
likely that people want to set general device properties such as MAC
address instead of reconfiguring ingress/egress QoS mapping, which is
the only editable property of preexisting VLAN device config dialogs.

Ref: https://github.com/openwrt/luci/issues/5102
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3c6b59504a)
2021-06-12 19:24:00 +02:00
Jo-Philipp Wich
5886f7478d luci-mod-network: interfaces: restructure DHCPv6 and IPv6 RA options
- Condense overly large IPv6 RA/DHCPv6 description texts and get rid of most embedded markup

 - Switch ra/ndp/dhcpv6 mode selections to rich dropdown lists and move extended choice
   descriptions next to the selection options

 - Drop ndproxy_static option which has been removed from odhcpd long ago

 - Add format validations to all text input fields

 - Add ability to configure master/relay modes for non-static interfaces (#2998)

 - Move extended RA configuration options into a new tab

 - Prevent enabling master mode on multiple interfaces

 - Prevent enabling ra/dhcpv6 server mode on non-static or master interfaces

 - Drop ra_management in favor to ra_flags option (#5083)

 - Add support for dns_service option

 - Read current effective IPv6 MTU and hop limit placeholder values from procfs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 3fbd433884)
2021-06-12 19:23:49 +02:00
Jo-Philipp Wich
9660eedfda luci-app-firewall: further luci-rpc/getHostHints compatibility fixes
Rework some further code instances to fall back to the legacy ipv4/ipv6
properties if needed.

Fixes: c7b7b42cd3 ("treewide: Update JS using luci-rpc getHostHints")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit dc0cfc642e)
2021-06-12 19:23:46 +02:00
Jo-Philipp Wich
a6a6d61d9c luci-proto-wireguard: fix fwmark validation to allow 32 bit values
The iptables mark field is 32 bits wide, which is 4 bytes and so 8 hex
characters. Fix the fwmark validation to allow 8 characters in the hex
string.

Fixes: #5098
Suggested-by: Robert <32970961+differentblue@users.noreply.github.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit bc1015f7db)
2021-06-12 19:23:42 +02:00
Jo-Philipp Wich
49e25bd03e luci-base: network.js: sorting fixes
Ensure that sort callbacks consistently return [-N .. 0 .. +N] values
instead of just true/false.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e35041e0a8)
2021-06-12 19:23:37 +02:00
Niels Widger
7d7df070c3 treewide: Update JS using luci-rpc getHostHints
Update frontend JS code which uses luci-rpc getHostHints to support the new
response format which removes the `ipv4` and `ipv6` host hint string fields
and replaces them with `ipaddrs` and `ip6addrs` weighted string list fields.

Signed-off-by: Niels Widger <niels@qacafe.com>
[rework code to be forwards/backwards compatible, fix some Network.Hosts
 methods, fix IP choice ordering, change commit subject, rewrap commit
 message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c7b7b42cd3)
2021-06-12 19:23:28 +02:00
Niels Widger
87bcf9e923 rpcd-mod-luci: Return array of addresses in getHostHints
Update luci-rpc's getHostHints method to return two string arrays for
each host, `ipaddrs` and `ip6addrs`, each containing the host's IPv4
and IPv6 addresses, respectively.  Each array is sorted by a priority
derived from the source from which the address was discovered.  The
current address sources and their priority is as follows (a
higher (larger) priority is listed first):

    - neighbor table entries: 10
    - /etc/ethers entries:    50
    - DHCP leasefile:        100
    - RRDNS queries:         100
    - getifaddrs():          200
    - UCI static leases:     200

The existing `ipv4` and `ipv6` string fields for each host in
`getHostHints` has been removed.  Downstream users of getHostHints
still need to be updated.

Fixes: #4838
Signed-off-by: Niels Widger <niels@qacafe.com>
[squash commits, reformat fixes tag]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit a5195e7825)
2021-06-12 19:23:25 +02:00
Jo-Philipp Wich
127b896a52 protocols: rename "device" option to "_modem_device"
This is required to resolve clashes with the generic "option device"
referring to netdev names in current netifd versions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 96ee6dc8d6)
2021-06-12 19:23:21 +02:00
Jo-Philipp Wich
56cd1abbe8 luci-mod-network: rename "device" option to "_net_device" internally
This is required to resolve conflicts with the existing "device" option
in other proto handlers such as PPP or QMI where "device" refers to the
device path of the tty control device instead of a netdev name.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 10f02472c5)
2021-06-12 19:23:18 +02:00
Jo-Philipp Wich
caa0abf99a luci-mod-network: clarify device settings reset button tooltip
Ref: #5090
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 26e21d43b5)
2021-06-12 19:23:13 +02:00
Jo-Philipp Wich
9bbf5d4002 luci-base: form.js: consider aliased options in AbstractValue.remove()
If different options point to the same underlying uci option, we must only
remove the uci value if none of the other alias options is active in order
to prevent inactive options (due to unsatisfied depends) removing the uci
value of active once on save.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit f3f74bd0fe)
2021-06-12 19:23:10 +02:00
Jo-Philipp Wich
5bdb5fd697 luci-mod-network: don't accidentally reset macvlan device names
Fixes: #5081
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 671c94b034)
2021-06-12 19:23:06 +02:00
Jo-Philipp Wich
1818ddcac3 luci-theme-bootstrap: add svg help icon to form field descriptions
The still referenced help.gif icon is absent by default since it has been
moved to luci-compat.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6960819997)
2021-06-12 19:23:01 +02:00
Jo-Philipp Wich
b796bff7a9 luci-mod-network: make device selector dependent on protocol (again)
This commit effectively reverts the change made with
907b4222f7 ("luci-mod-network: don't hide "Device" on protocol change").

Floating tunnel protocols such as 6in4, plain PPP over modem device,
VPNC etc. do not have any layer 2 device at all, for such protocols the
device selector should be hidden.

Also swap back the incorrect option order introduced with commit
b7f3cf66ca ("luci-mod-network: drop support for *adding* legacy bridges").

Since device depends on proto, it should come after the protocol selection,
not before.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit fc12933670)
2021-06-12 19:22:57 +02:00