Commit Graph

13 Commits

Author SHA1 Message Date
David Härdeman
8640ed2b6b luci-mod-network: remove unused permissions from dns
Now that all options have been organized per view, remove unused acl
permissions from dns.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
David Härdeman
babd189670 luci-mod-network: split dhcp and dns into separate views
In order to make the following patches easier to follow, this patch simply
makes an identical copy of:

modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js

as:

modules/luci-mod-network/htdocs/luci-static/resources/view/network/dns.js

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-18 23:51:38 +02:00
David Härdeman
50abd15e88 luci-mod-status,-network: remove checkUfpInstalled
Right now, the checkUfpInstalled RPC call is performed first, and only after
that can the other Promises be called. Simplify this by adding a single check
for /usr/sbin/ufpd in the rpcd ucode, and replace calls to checkUfpInstalled()
with simple L.hasSystemFeature('ufpd') check (which is only done once, and
cached).

This also allows the 'stat' permission to be removed from a couple of acls.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-10-16 01:24:42 +02:00
Christian Korber
70b7176fc2 luci-mod-status,luci-mod-network: support oui to vendor resolving
For easier definition of connected devices, this commit adds support
to identify them by vendor name.

Package `upf-neigh` is needed to lookup the vendor name in a hash table.
It implements a ubus-call `ubus call fingerprint fingerprint`:

```
root@<redacted> ~ # ubus call fingerprint fingerprint
{
        "7c:c2:55:XX:XX:XX": {
                "vendor": "Super Micro Computer, Inc."
        }
}
```

Fixes: #2065
Depends on: openwrt/packages#27257

Signed-off-by: Christian Korber <ck@dev.tdt.de>
2025-09-25 13:25:33 +02:00
Paul Donald
e23f6069d6 luci-mod-network: remove old netifd version check which needs opkg
master and 24 use much newer versions.

This will prevent a read error on the non-existent control file when
the system uses apk.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2024-12-15 21:08:56 +01:00
Yann Diorcet
38be2663ea ACL: Add system read for luci-mod-network needed for timezone in wireless 2024-09-06 01:31:17 +02:00
Paul Donald
e792e055e1 luci-mod-network: add getHostHints to luci-rpc permissions
it would seem that this was forgotten somewhere along the way

Signed-off-by: Paul Donald <newtwen@gmail.com>
2024-01-25 01:37:14 +01:00
Jo-Philipp Wich
276046c8e9 luci-mod-network: handle dynamic device configuration defaults
Most uci network device configuration settings have no specific default
value which means that netifd will only alter the related sysfs parameters
if an explicit value is specified in uci. When omitted from the
configuration, the related sysfs setting is left untouched.

This behaviour collides with LuCI's approach of purging boolean options
from the configuration if they match their default value, leading to the
inability to disable or enable certain settings as described in #6219.

Solve this issue by replacing flag widgets with tri-state selects offering
an "automatic" (default) as well as an explicit "enabled" and "disabled"
choice. Also query sysfs on load and preset the automatic choice with an
indication whether the underlying sysfs settings is currently active or not.

Fixes: #6219
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-02-07 10:09:42 +01:00
Paul Spooren
22b7442011 luci-mod-admin-full: add arp-scan to network diagnostic
This is a JavaScript rewrite of the PR#5152

It adds the ability to perform ARP scans if the tool `arp-scan` is
installed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-11 11:15:17 -10:00
Jo-Philipp Wich
3fbd433884 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>
2021-06-03 10:43:36 +02:00
Rafał Miłecki
17af33ee48 luci-mod-network: migrate network config depending on netifd version
Checking netifd version is important for users of the most recent LuCI
that didn't update netifd (e.g. OpenWrt package).

Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2021-05-26 13:29:55 +02:00
Jo-Philipp Wich
faad7464a8 luci-mod-network: add support for network.device sections
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-03-15 11:40:30 +01:00
Jo-Philipp Wich
c099344013 treewide: reorganize base ACLs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-09 23:23:33 +02:00