625 Commits
Author SHA1 Message Date
Sergei S. d9205d99c6 luci-mod-network: add scrolling to wireless scan results modal
Allow scrolling of wireless scan results within the modal.

Signed-off-by: Sergei S. <it4notice@proton.me>
2026-10-05 20:35:43 +03:00
Michael Pfeifroth aa3d48836e luci-mod-network: hide incompatible encryption modes for 6 GHz
The WiFi 6E (6 GHz) standard mandates WPA3 and management frame
protection.  While wifi-scripts already silently upgrades mixed modes
(psk-sae -> sae) on 6 GHz radios, the LuCI encryption dropdown still
offers all WPA2/WPA/WEP options, leading to confusing hostapd failures
when users pick an unsupported mode.

When the radio band is 6 GHz, hide encryption options that are
incompatible with the standard:
- WPA2-PSK, WPA-PSK, WPA-PSK/WPA2-PSK Mixed Mode
- WPA2-PSK/WPA3-SAE Mixed Mode (6 GHz does not allow WPA2 fallback)
- WPA2-EAP, WPA-EAP, WPA2-EAP/WPA3-EAP Mixed Mode
- WEP
- No Encryption (6 GHz requires protected management frames)

This leaves WPA3-SAE, WPA3-EAP, WPA3-EAP 192-bit, and OWE as the
available choices for 6 GHz interfaces.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
2026-10-01 20:42:34 +02:00
Ivan Kvashonkin 9aff465238 treewide: wrap loose view content in cbi-section
Views that returned headings, tables and control rows with nothing around
them now wrap that content in a section: the system and kernel logs,
Processes, the nftables and iptables views, Startup, the wireless station
list, DSL stats and the package manager. The nftables rule tables also
drop an !important that no theme could override.

Nothing changes in the stock bootstrap theme; themes that draw
.cbi-section as a panel get the structure they need.

Signed-off-by: Ivan Kvashonkin <vizzlef@gmail.com>
2026-09-06 21:47:04 +03:00
Michael Pfeifroth 3e12b5338f luci-mod-network: fix capitalization of "WLAN Roaming" tab
The WLAN roaming tab label used a lowercase "r" in "roaming",
inconsistent with the title-case convention used by other tabs
(e.g. "MAC-Filter", "Advanced Settings"). Capitalize it to
"WLAN Roaming" and update the msgid in all translation files.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
2026-07-21 11:21:56 +02:00
Paul Donald ef8e96aadb luci-mod-network: correct link bonding setting
netifd only understands packets_per_port which it converts/writes to
sysfs packets_per_slave.

Also, the value 0 is valid.

Closes #8830

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-07-19 10:37:27 +03:00
Matheus Sampaio Queiroga f4c5c76b4f luci-mod-network: add auto-negotiation, phy speed and duplex
Some settings that were missing from the device configuration have been
added to control auto-negotiation, PHY speed, duplex, and rx/tx pause.

If the interface has available Phy links speeds, those values will be
used, otherwise, static values will be used, such as 10Mbps half/full.
100Mbps half/full, 1Gbps full, 2.5Gbps full, etc...

Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2026-07-19 09:23:44 +02:00
Samuele Yang f7e5991230 luci-mod-network: fix available wifi channels
rpcd iwinfo freqlist does not set a `no_ir` field.
It is instead a flag so check in the flags list instead.

Signed-off-by: Samuele Yang <samuele.yang@morsemicro.com>
2026-07-09 11:32:07 +02:00
Hauke Mehrtens e9fc1b61c4 luci-mod-network: wireless: add gcmp256, sae_ext_key, transition_disable
Expose three per-BSS WPA3 tuning options in the wireless security tab:

 - gcmp256: advertise the GCMP-256 pairwise cipher
 - sae_ext_key: advertise the SAE-EXT-KEY AKM (SAE using a group-dependent
   hash, aka SAE-GDH)
 - transition_disable: signal Transition Disable (WPA3 Specification v3.5
   section 13) so a client that connected once no longer downgrades

GCMP-256 and SAE-EXT-KEY are mandatory for Wi-Fi 7 (EHT) but break
interoperability with some clients. The wifi-scripts backend therefore
defaults them on only for WPA3-Personal Compatibility Mode (sae-compat)
on an EHT radio, and off everywhere else. The gcmp256/sae_ext_key
checkboxes mirror that default, derived from both the encryption mode and
the radio htmode, so the box shows the real default: leaving it untouched
keeps the option unset (the backend decides), while toggling it writes an
explicit override. As htmode is a radio property, not a wifi-iface one,
it is read from the current selection of the radio's frequency widget
(falling back to the saved config) instead of a same-section dependency.

transition_disable is offered only for the WPA3-only modes where the
signalled bitmap is non-empty.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/luci/pull/8790
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-09 01:28:44 +02:00
Hauke Mehrtens 7af3cf4f00 luci-mod-network: wireless: add WPA3-Personal Compatibility Mode
Expose the sae-compat encryption mode (WPA3-Personal Compatibility Mode)
in the wireless security settings. It advertises WPA2-PSK in the base
RSNE while offering SAE through RSN Override elements, so that both
legacy WPA2 and modern WPA3 clients can connect to a single SSID.

The mode relies on RSN overriding, which is an access-point feature, so
it is offered for AP mode only. It gets the passphrase field and, like
the other WPA2/WPA3 modes, the 802.11r, KRACK-countermeasure and WPS
options.

Assisted-by: Claude:claude-opus-4-8
Link: https://github.com/openwrt/luci/pull/8790
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-07-09 01:28:39 +02:00
Coia Prant 3b4f44d8e3 luci-mod-network: don't show Carrier on dynamic/alias interface
Carrier is always Absent on dynamic/alias interface.

Don't show Carrier on dynamic/alias interface.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
2026-07-07 16:39:46 +02:00
Mirko VogtandStarDev 59e2490205 luci-mod-network: fix Switch/VLAN view CSS across LuCI themes
Override theme-wide input min-widths and button resets so port labels stay
inside tiles and T/U colour-coding renders on openwrt-2020 and material.
Use theme CSS variables for row and border colours where available.

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
Co-authored-by: LLM (Composer)
2026-06-28 22:40:41 +03:00
Paul Tobias 93d2f790d9 luci-mod-network: add link speed column to the devices tab
The negotiated link speed of a network device isn't shown on the Network
configuration pages, so a link stuck below its capability (e.g. a gigabit
port at 100 Mbit/s) goes unnoticed.

Add a "Link Speed" column to the Devices tab showing the negotiated speed,
with the device's ethtool-supported speeds in a tooltip when available, and
"-" when the device has no carrier or reports no speed. The columns are
ordered by OSI layer: link speed (L1) before MAC (L2) and MTU (L3).

The current speed comes from the device link state; the supported speeds are
the distinct network.device status "link-supported" modes, fetched once in
load(). Add the network.device "status" ACL grant so the view can call it.

Signed-off-by: Paul Tobias <github@tobias.pt>
2026-06-26 09:18:17 +02:00
Mirko Vogt 5a19d9518a luci-mod-network: experimental Switch/VLAN config notice
Add warning about this config view being new and considered experimental.

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
2026-06-23 17:17:36 +03:00
Mirko VogtandStarDev 9babb3e47a luci-mod-network: add new Switch/VLAN configuration
Register a new "Switch/VLAN config" entry in the Network top-level
menu and add the view at view/network/switch-vlan.js.

The menu entry is only visible when the network configuration
contains either a bridge device with vlan_filtering explicitly
enabled or at least one bridge-vlan section (mirroring the implicit
enable behaviour of the existing Bridge VLAN filtering dialog).

The view itself locates the first such bridge in declaration order,
detects configurations that the new view cannot represent (PVID
different from the untagged VLAN, duplicate untagged memberships,
etc.) and blocks access with an explanatory error in that case.

The following shortcomings resulted in an alternative Switch/VLAN
view:

 - To reach the current switch/VLAN config page, one has to click
   through: Network -> Interfaces -> Devices -> Configure... (the
   respective switch/bridge) -> Bridge VLAN filtering which - at
   least for dedicated switches - is not sth. I feel comfortable
   having to do every time I want to make a basic change.

 - While ~5 ports might still fit next to each other, starting with
   2 figure numbers (at the latest), we end up scrolling
   horizontally. Finding a higher port to configure on a 24 or 48
   port switch inevitably results in plenty of horizontal scrolling,
   while at the same time you have to memorise which row maps to
   which VLAN-ID, as those scroll out the moment you start
   scrolling.

 - Every port needs to be configured by its own, no way to bulk-conf
   them, to apply the same VLAN config onto multiple ports (e.g.
   applying the same tag onto a large number or all ports).

 - Ports and VLAN-IDs are defined by sole numbers. There's no way to
   annotate them, e.g. a VLAN ID as "iot" or "mgmt", or a port as
   e.g. "uplink" or "server-mirko".

With the following changes:

 - Add a dedicated "Switch/VLAN config" entry within the top-level
   "Network" dropdown (you might remember we already had such for
   swconfig back then, before it got obsoleted by DSA and conf via
   vlan aware bridges).

 - Avoid horizontal scrolling by showing switch ports in multiple
   rows if not fitting screen width.

 - Allow selection of multiple ports to configure them all the same
   way at once.

 - Introduce labels for ports and VLANs; they're optional annotations
   and don't serve any functional purpose except hinting the user,
   hence stored in respective sections within /etc/config/luci.

 - Visualising which VLANs are assigned to which ports by colour-
   coding the ports when hovering over configured VLANs.

Signed-off-by: Mirko Vogt <mirko-openwrt@nanl.de>
Co-authored-by: Opus and/or Composer
2026-06-23 17:17:36 +03:00
Jo-Philipp Wich 55379d04fc luci-mod-status: escape hostname in DHCP lease status tables
Avoid stored XSS by HTML escaping backend provided hostname
since underlying services to not sanitize.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2026-06-23 00:15:31 +02:00
Andy Chiang c76f968d82 luci-mod-network: fix redundant translation strings
_('<em>%s</em>') caused redundant strings like <em>%s</em> to appear in i18n.
_('<em>Add</em>') caused redundant strings like <em>Add</em> to appear in i18n.
in addition, delete an extra space.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-06-12 19:12:05 +03:00
Paul Donald 98fefa8b5b luci-mod-network: convert tag strings i18n
follow-up to 8553ba3f6e

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 16:40:44 +03:00
Paul Donald 8553ba3f6e luci-mod-network: convert tag strings i18n
settags

closes #8603

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 16:25:08 +03:00
Paul Donald ad487f931f luci-mod-network: convert tag strings i18n
matchtags

closes #8603

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 16:25:02 +03:00
Paul Donald 2708c78089 luci-mod-network: correctness fixes
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-05-27 15:49:46 +03:00
Andy Chiang 0df858d63c luci-mod-network: keep steering_flows in config file
remove `o.default` to keep steering_flows in config file

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-27 14:32:38 +03:00
Andy Chiang c1a2e28f9d luci-mod-network: dhcpv4 option uses '' instead of "disabled"
"disabled" is the default dhcpv4 option in odhcpd.
Which has the same effect as not defining it.
Using '' will prevent unnecessary parameters from being written to the flash.

Link https://github.com/openwrt/odhcpd/blob/master/README.md

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-27 14:32:38 +03:00
Andy Chiang bfcfec76ae Revert "luci-mod-network: ra_preference option uses '' instead of "medium""
This reverts commit 6bcdc18d65.

Since the bug where a write operation is executed when the input
matches the default has been fixed in form.js, this workaround
is no longer needed and is being reverted.

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-27 14:32:38 +03:00
Andy Chiang 6bcdc18d65 luci-mod-network: ra_preference option uses '' instead of "medium"
"medium" is the default ra_preference option in odhcpd.
Which has the same effect as not defining it.
Using '' will prevent unnecessary parameters from being written to the flash.

Link https://github.com/openwrt/odhcpd/blob/master/README.md

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-19 12:15:11 +03:00
Andy Chiang 317ff9dd76 luci-mod-network: mptcp option uses '' instead of "off"
In the mptcp options, "off" is the default option, which has the same effect as not defining it.
Using '' will prevent unnecessary parameters from being written to the flash.

Link https://openwrt.org/docs/guide-user/network/mptcp

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
2026-05-16 11:09:45 +03:00
Paul Donald 6f461a225e luci-mod: use built-in format for wifi hostname
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-04-20 14:46:13 +02:00
weicheng04 1655946120 luci-mod-network: fix uci.remove() deleting entire radio section on wifi join
In handleJoinConfirm(), when the scanned BSS has no VHT/HT info,
uci.remove('wireless', radioDev.getName(), 'htmode') is called
intending to remove only the htmode option. However, uci.remove()
only accepts (conf, sid) and silently ignores the third parameter,
causing the entire wifi-device section to be deleted from the
rpcd session delta.

This makes the radio disappear from the Wireless Overview page
until the session delta is cleared.

Fix by using uci.unset() which correctly handles three parameters
(conf, sid, opt) to remove a single option.

Signed-off-by: Weicheng Xiao <weicheng.xiao@outlook.com>
2026-04-10 15:51:11 +02:00
Paul Donald a6b7ad4652 luci-mod-network: check kernel for mptcp to display MPTCP options
https://www.kernel.org/doc/html/v6.12/networking/mptcp-sysctl.html

There may be user instances where mptcp was not compiled
into the kernel or is an unloaded module, so gate the options
behind the feature check.

Closes #8522

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-04-04 19:12:54 +02:00
Ramon Van Gorkom a4f0c52fbf luci-mod-network: show option also for sae
For sae the cipher overrule is not exposed.
There can be cases where this is needed.
See e.g. https://github.com/openwrt/openwrt/issues/22200

Signed-off-by: Ramon Van Gorkom <Ramon00c00@gmail.com>
2026-03-30 14:53:29 +02:00
Paul Donald 761c2cda5f luci-mod-network: tighten MAC check regex
dnsmasq behaviour changed slightly and MACs separated
by hyphen are no longer accepted. Accept only colon
separator when validating. Also enforce hex doublets,
i.e. 00 instead of 0.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-23 19:10:01 +01:00
Paul Donald 1d7fa8163c luci-mod-network: align STP defaults with netifd
Closes #8443

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-19 21:29:19 +01:00
Vishnu Verma fc28ca58da luci-mod-network: fix field names for private key file and password
Fixed field names to be compatible with wpa_supplicant ucode script

Signed-off-by: Vishnu Verma <vermavishnuverma@gmail.com>
2026-03-16 22:19:18 +01:00
Christian Marangi 068150ba5f luci-mod-network: escape WiFi SSID on Scanning AP modal
After the ES2016 rework, a very old bug was reverted where the WiFi SSID was
treated as raw HTML and directly appended to DOM.

This might result in XSS vulnerability with specially crafted SSID from the
Access Point around.

This is only triggered on opening the modal as the normal wireless.js view
doesn't scan the Access Point.

To fix this and make it more clear that SSID must be always escaped, move the
SSID handling to a dedicated variable and use the document.createTextNode()
to escape it similar to how it's done in similar place like the
channel_analysis.js

Fixes: cdce600aae ("luci-mod-network: give wireless.js ES2016 treatment and refactor")
Reported-by: Sasha Romijn <sct@mxsasha.eu>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-03-13 19:15:53 +01:00
Paul Donald 69596756a7 luci-mod-network: allow interface names to max of 15 chars
The Kernel receives the name suffix, so evaluate length on
the user provided name and disconnect the formatted name
code length check.

Closes #8390

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-05 18:50:31 +01:00
Paul Donald 2b63b19363 luci-mod-network: drop unused dnsmasq ipset option
Closes #8365

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-03-02 19:11:21 +01:00
Paul Donald 9e21e74888 luci-mod-network: MPTCP
See openwrt/openwrt@c8d5abd62b

Available since 24.10

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-20 02:58:46 +01:00
Paul Donald 95b01600e3 luci-mod: js linting fixes / ES6 treatment
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-16 01:42:57 +01:00
Paul Donald 4f433cc918 luci-mod-network: enable row filtering for interfaces overview
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-02-03 06:42:16 +01:00
Youfu Zhang bc2d7b5b1a luci-mod-network: fix placeholder for roaming identifiers
OpenWrt commit 3cc56a5 chaged the default value of `mobility_domain` and
`r1_key_holder` options. This commit removes the stale hard-coded `4f57`
from luci to avoid ambiguity.

Closes: openwrt/luci#8267
Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2026-01-29 19:22:13 +01:00
Carlo Szelinsky 8e493db75a luci-base: poe and PSE details & configuration
Adds PoE/PSE configuration support for modern linux (PSE-PD).
This change is based on the PSE-PD backport (from 6.17)
and netifd|ubus changes.

* Add getPSE() [receive all status information]
and hasPSE() [has the device PSE hardware?]

* Changes ACL permissions to query network.device status information

* Add two new PoE icons (PoE active with link up + link down) for
the port status page

* Changes port status to show PoE information, next to link information
and data transfer.

* Add a new tab for PoE/PSE to the device configuration,
which will only be displayed if the device supports PSE

Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
2026-01-26 03:40:38 +01:00
Paul Donald 4de4296642 luci-mod-network: add PIO flag management
odhcpd specific flag. PD-P only works with dhcpv6_pd and dhcpv6.

Also move some DHCPv6 specific settings to a new DHCPv6 tab.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-11 23:35:42 +01:00
Paul Donald 44c934efec luci-mod-network: fill set tag fields with available tags
Add predefined tags that the user sets

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2026-01-06 04:08:55 +01:00
Paul Donald 3c8ff55120 luci-mod-network: add tags tab
For use with dnsmasq tags

Note that a MAC tab is possible but the same functionality
is present in the leases tab which handles MACs and tags.
A MAC tab has a 1:1 tag:MAC relationship, whereas the leases
has a many:many relationship.

The dnsmasq init file needs updating to use 'tag' in
place of 'networkid', which is an older legacy format still
understood by dnsmasq, but all documentation uses 'tag'.

tag names shall not match:
- network devices/interfaces
- service names

Three dnsmasq reserved tag names are:
- known
- !known
- known-othernet

Tag names can be prepended with '!' to invert their usage.

Closes #7178

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-31 18:37:15 +01:00
David Härdeman 7a18a0ef42 luci-mod-network: show leases first in DHCP tab
Fiddling with the dnsmasq/odhcpd specific settings is (at least in my
experience) a much less common operation than wanting to see/change
leases and their configuration, so reorder the tabs to show leases first
and dnsmasq/odhcpd tabs second/third.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-31 00:52:36 +00:00
Liangbin Lian 74d2192e83 luci-mod-network: show "dhcpv4" option for dnsmasq
For odhcpd, an empty "dhcpv4" is equivalent to "disabled",
but for dnsmasq, an empty "dhcpv4" is equivalent to "enabled",
so an empty "dhcpv4" is ambiguous.

Fixes https://github.com/openwrt/openwrt/issues/21220

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2025-12-23 13:22:01 +01:00
David Härdeman effe3ea281 luci-mod-network: update dhcpv6_pd_min_len values
odhcpd will allow a greater range of PD prefix lengths, so update the UI
to reflect this.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-19 13:18:43 +01:00
Paul Donald c937c7fa27 luci-mod-network: reveal ra_preference as router priority
router preference sounds ambiguous, so we name it priority which
has an unambiguous meaning.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-13 18:57:21 +01:00
Paul Donald ef4a1c9cea luci-mod-network: remove debugger statement
follow-up to 7df4840b1c

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-13 13:36:59 +01:00
David Härdeman ac136290da luci-mod-network: update odhcpd configuration
Update two cfg parameters that have changed names/behaviour in recent
versions of odhcpd.

Signed-off-by: David Härdeman <david@hardeman.nu>
2025-12-13 13:15:15 +01:00
Paul Donald 7df4840b1c luci-mod-network: ES6 refactor for diagnostics
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-12 16:40:04 +01:00