Commit Graph

25 Commits

Author SHA1 Message Date
Paul Donald
ddb569074e luci-mod-network: prevent double key for menu JSON
follow-up to 7e1b545bfa

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-25 02:19:50 +02:00
Paul Donald
7e1b545bfa luci-mod-network: change && to || for DHCP tab predicates
Each prerequisite inside a { } forms an and condition.
Each {} prerequisite forms an or condition.

The tab wasn't displayed because odhcpd was not installed. The condition set
required both. Now only require one or the other to display the DHCP tab.

Closes #8033

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-10-24 15:36:09 +02:00
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
Florian Eckert
549cecb0c5 luci-base: move and rename ucitrack odhcpd.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Florian Eckert
4a95439531 luci-base: move and rename ucitrack dhcp.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Florian Eckert
a197b80270 luci-base: move and rename ucitrack network.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +02:00
Florian Eckert
014b65786b luci-base: move and rename ucitrack wireless.json
Move the json file to where it belongs.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-11 16:15:52 +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
Vladislav Grigoryev
b4f4799f9e luci-mod-network: network/routing support for pbr
Provide comprehensive routing configuration:
* Rename the "Network > Routes" page to "Network > Routing".
* Unify sorting for the "Status" and "Network" menus.
* Add the tabs "IPv4 Rules" and "IPv6 Rules" to the "Routing" page.
* Provide configuration for IPv4 and IPv6 routing rules.
* Consolidate routing configuration and terminology for IPv4 and IPv6.

Policy-based routing is an increasingly popular problem.
Netifd natively supports policy-based routing:
* Interface-specific options "ip4table" and "ip6table".
* Routing rules using the "rule" and "rule6" sections.
LuCI is missing configuration for routing rules.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
2021-09-01 10:51:16 +03:00
Fritz D. Ansel
2393289367 network: hide dnamsq (dhcp+dns) item
.. when no dnsmasq is installed, as it
tells only that there are no settings available

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
2021-08-11 09:25:51 +02:00
Vladislav Grigoryev
96ef7beb66 luci-mod-network: merge hosts with dns settings
The current location for "Network > Hostnames" is confusing.
It is provided by Dnsmasq and partly overlaps with static leases.

Merge "Hostnames" with "Network > DHCP and DNS" as an extra tab.
Also add a simple explanation of the use case.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
[Fix typo in label description string]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-08-09 19:56:50 +02: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
8f34e105c0 treewide: add ACL annotations to menu entries
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-17 12:40:31 +02: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
Jo-Philipp Wich
ab07b8c4d9 luci-mod-network: reimplement diagnostics page as client side view
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:18 +01:00
Jo-Philipp Wich
5448a10e30 luci-mod-network: convert menu nodes to JSON
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:18 +01:00