100 Commits
Author SHA1 Message Date
Felix Fietkau 5b3b961f41 ucode-mod-bpf: bump PKG_RELEASE
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 9565a9bd91 ucode-mod-bpf: add map info method and map type constants
Scripts need the map type to know how to interact with a map, e.g.
per-CPU value handling or keyless queue/stack semantics. Add an
info() map method returning type, key/value size and max_entries,
along with BPF_MAP_TYPE constants for comparison.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau a148933214 ucode-mod-bpf: add ring buffer and perf event buffer support
Add consumer support for BPF_MAP_TYPE_RINGBUF and
BPF_MAP_TYPE_PERF_EVENT_ARRAY maps. ringbuf(callback) and
perf_buffer(callback, pages, lost_callback) map methods return a
buffer resource with fileno, poll and consume methods. The fileno
method exposes the epoll fd and matches the interface uloop.handle()
expects, so a buffer can be passed directly to uloop for event loop
integration.

The ring buffer callback receives the sample data and may return a
negative integer to stop consumption; the perf callbacks additionally
receive the CPU number.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 9b7ddbaef9 ucode-mod-bpf: add map-in-map and prog array support
Updates on array/hash-of-maps and prog array maps take the fd of the
inner object as a 4-byte value. Accept bpf.map and bpf.program
resources as map values and convert them to their fd.

Lookups on map-in-map types return the inner map id; add open_map_id
and open_program_id to obtain a usable object from such an id.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau ec06937a5a ucode-mod-bpf: add support for keyless maps
Queue and stack maps have zero-sized keys and require a NULL key
pointer; the kernel rejects any non-NULL key with EINVAL, making
these maps unusable. Accept a null key argument on maps without a
key, mapping get() to peek, set() to push and delete() with return
to pop.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 9070d0e630 ucode-mod-bpf: add per-CPU map support
Lookup, update and lookup-and-delete on per-CPU maps use buffers of
roundup(value_size, 8) * num_possible_cpus bytes. The previous code
sized buffers for a single value, so get() on a per-CPU map made the
kernel overflow the stack buffer and set() passed undersized data.

Track the map type and size the buffers accordingly. get() and
delete() with return now yield an array with one value per CPU, set()
accepts either such an array or a single value replicated to all
CPUs.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau acc687da84 ucode-mod-bpf: fix error reporting in tc hook setup
Failures in the detach path returned NULL without recording any error
state, so error() reported a stale or empty error. Attach failures
reported a hardcoded ENOENT regardless of the actual cause. Record
errno for all failures; if_nametoindex, bpf_tc_attach and
bpf_tc_detach all set it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 05208d9a7e ucode-mod-bpf: fix stale errno when rodata map is missing
bpf_object__next_map does not set errno when it runs out of maps, so
the reported error code was whatever errno happened to hold. With
errno 0 the failure was invisible to error(). Report ENOENT instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau e04461835a ucode-mod-bpf: fix unaligned access in integer iterator
The iterator key buffer is a flexible array member placed directly
after a bool, leaving it without natural alignment for the u32/u64
loads in next_int. Copy the key via memcpy instead of dereferencing
a misaligned pointer, which traps on strict-alignment targets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 5c35e410fc ucode-mod-bpf: fix key/value aliasing in map argument conversion
uc_bpf_map_arg converted integer arguments through a single static
buffer. When map set was called with both an integer key and an integer
value, the second conversion overwrote the first, so the element was
written at the wrong key. Convert into a caller-provided buffer
instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 3c5e204abe ucode-mod-bpf: fix missing resource pointer checks
uc_fn_thisval can return NULL when a method is called with a foreign or
missing this context. pin, foreach and the iterator next functions
dereferenced the result without checking it, crashing the VM.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-20 10:43:36 +02:00
Felix Fietkau 23ac692e6d ucode: update to Git HEAD (2026-07-09)
20a2ae469089 io: support older linux ioctls
16929698e2d3 fs: implement ioctl for macOS
395bb888bd69 io: implement ioctl for macOS
8d7d15ee1a08 compiler: add support for shorthand method declarations
7d9febd13305 nl80211: add mesh peer link enum macros to constants list
e851bb64df91 lib: avoid allocating print buffer before NULL check in uc_error_message_indent
5f3a7b87d962 compiler: prevent unbounded recompilation on failed module imports
e2493b577250 compiler: scope named function expression names to their own body
c3f0d27d812e tests: add regression test for named function expression scoping
738b55299966 vm: release owned value when property assignment fails
1ffd7c5a1011 vm: fix out-of-bounds read in single-name module import
a255256db106 vm: fix SIGFPE on INT64_MIN division and modulo by -1
3f4b313d7d78 vm: do not assign to undeclared variables in strict mode
e523682670a2 vm: release upvalue reference when resolving it on stack push
6a837090bea3 vm: release module scope reference in dynamic import
395a0a16b4f9 vm: guard error context capture against empty callframe stack
04f103bb2270 vm: respect exponent parity in integer exponentiation
bd814a4b2ae3 vm: use UC_ARRAY instead of json_type_array in object spread
5a79aa56c15e vm: release resource type prototypes after the final GC
9c5f16c8e33a lexer: do not treat /*/ as a complete block comment
a018067fd12e lexer: preserve NUL bytes in regular expression literals
65d41a1929de lexer: do not consume a sign into hexadecimal number literals
05f9bf9e5d53 lexer: fix source position of ternary question mark token
7bca646e5f88 lib: preserve embedded NUL bytes in reverse()
6fc93bf5bd95 lib: preserve embedded NUL bytes in lc() and uc()
a51f4843bce5 lib: avoid passing a signed char to isxdigit() in hex()
e8af70e4375c compiler: fix use-after-free of shorthand method name
467fb4406a47 compiler: declare leading variable in counting for loop initializer
d256e153799b rtnl: fix stack buffer overflow parsing IFLA_LINKINFO
f741ac0a144c rtnl: fix stack buffer overflow parsing RTA_MULTIPATH nexthops
c41310f7c2df rtnl: fix inverted address check in multipath nexthop parsing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 766052bab3 wifi-scripts: don't swap handler config under a running setup script
A reload during an in-flight setup ran wdev_config_init() immediately,
replacing handler_config/handler_data while the script was still running, so
its set_data notifications resolved against the new (renumbered) interface
table and link up/down calls became asymmetric. Defer the re-init in
check() while a handler run is in progress and re-apply from the setup and
teardown callbacks once it completes.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau e6bd2af652 wifi-scripts: only manage wdev interfaces recorded in the statefile
wdev.uc adopted every operstate-down netdev on the phy and then removed any
not in its new config. hostapd BSS netdevs are legitimately operstate-down
while stopped (co-located STA down, or start_disabled), so a reload deleted
them and hostapd, seeing an unchanged config, never recreated them. Drop the
adopt-existing step; the statefile already tracks the interfaces wdev.uc
owns.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 1789118599 wifi-scripts: give the OWE-transition BSS its own MAC address
The transition BSS is a copy of the main BSS with the MAC already set, so
iface.prepare() was a no-op and both BSSes emitted the same bssid; with a
fixed or random MAC the duplicate was never reassigned and the second
interface failed to come up. Clear the address (and stale flags) and
prepare a fresh one, plumbing the phy/num_global/macaddr_base through
iface_setup().

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 4062d625ae wifi-scripts: emit per-line hostapd options correctly
append() space-joins list options into one line, which breaks hostapd
options that are parsed one entry per line: anqp_elem, nai_realm,
venue_name, venue_url, hs20_conn_capab and the radius req_attr lists (a
parse error there fails the whole phy). Add append_list() to emit one line
per element and route those options through it. vendor_elements is instead
a single concatenated hex blob (join ''), and iface_interworking() no
longer overwrites domain_name with the 3GPP cell-net data (and uses ';').

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 56d466a75d wifi-scripts: use country_code for iw reg set in setup_phy
validate() converts the country alias to country_code and deletes country
before setup_phy() runs, so the iw reg set branch tested a null
config.country and never ran, leaving wdev-only radios (adhoc/mesh/monitor)
on the world regdomain. Use config.country_code.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau f3cbf55143 hostapd: ucode: keep comment lines out of the config comparison data
The generator emits a '# Setup interface: <ifname>' comment before each
interface, so the first one landed in config.radio.data and made the radio
comparison depend on the first BSS's ifname: renaming it forced a full
radio restart instead of the rename path. Skip comment lines when parsing
radio.data/bss.data.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 26a4d50806 hostapd: ucode: filter MLD loops by phy in phy_set_state/phy_status
The per-wiphy radio-mask loops iterated all MLDs without checking the phy,
so a stop/start or status query for one wiphy touched MLDs on another wiphy
with the same radio index (clearing present bits, tearing links down, or
reporting a foreign MLD). Skip MLDs that do not belong to the phy, matching
mld_update_phy().

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 73c35f97f3 wifi-scripts: quote dpp_connector in the station config
dpp_connector was emitted unquoted, but wpa_supplicant parses it as a
string and hex-decodes an unquoted value; a base64url connector then failed
to parse and the network block was rejected. Emit it via the quoted-string
list. dpp_csign/dpp_netaccesskey stay raw, as they are hex.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau dd128675c5 hostapd: ucode: unregister ucode/ubus objects when deleting an unstarted BSS
hostapd_free_hapd_data() skips hostapd_ucode_free_bss()/hostapd_ubus_free_bss()
for a bss that never started, so bss.delete() on such a bss freed hapd while
the ucode registry entry and ubus object still referenced it. Call both
explicitly before os_free(); they are idempotent for the started case.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau b2755b0402 hostapd: ucode: initialise conf in iface.add_bss
The early error path jumps to out: before conf is assigned, where
hostapd_config_free(conf) frees an indeterminate pointer. Initialise it to
NULL (hostapd_config_free tolerates NULL).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 139f14717f hostapd: ucode: pass phy to the bss_remove callback
hostapd_ucode_free_bss() pushed only two arguments, but the bss_remove
handler (like bss_add/bss_reload) takes three (phy, name, obj), so name
received the bss resource: the DPP hook was never removed and the removal
event was malformed. Push the phy as well.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 06b3ef0ff5 wifi-scripts: use the base phy name for config_get_macaddr_list
phydev.name is already radio-suffixed, and the hostapd handler re-applies
the suffix, so on multi-radio phys the lookup missed and the returned MAC
list was always empty, letting wdev.uc reuse a MAC hostapd had reserved for
an AP BSS. Pass the base phy and radio index.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 97e8911c9b wifi-scripts: pass device config to parse_encryption for station mode
setup_sta() called parse_encryption() without the device config, so the
sae-compat branch dereferenced a null dev_config.band and threw, aborting
the whole radio setup. Pass the device config through.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 0bab595808 wifi-scripts: map the configured pairwise cipher for station mode
Only an exact GCMP cipher was mapped to the network block; other explicit
ciphers (CCMP-256, GCMP-256, TKIP variants) left pairwise unset, so
wpa_supplicant offered its default set and could not associate with an AP
restricted to the configured cipher. Pass wpa_pairwise through, keeping the
GCMP special case that also pins group.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 105dd239ac wifi-scripts: do not treat WDS-station VLAN subinterfaces as the base wdev
The hotplug match /(.+)\.sta.+/ also matched VLAN subinterfaces of a WDS
station (e.g. wlan0.sta1.100 -> wlan0), so the tagged subinterface was added
into the vif base networks, breaking VLAN separation. Anchor the pattern to
the plain station suffix.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau dc33d7bcb1 wifi-scripts: pass multicast_to_unicast as an integer
handle_link() passed the option as a ucode boolean, but the netifd
device_set binding reads it with prop_get_int (UC_INTEGER only) and ignored
a boolean, so the option was a no-op. Convert it to 0/1.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau fedefbf50f wifi-scripts: reset the retry counter on successful setup
retry was only reset on config change/start, never on a successful setup,
so occasional transient setup failures accumulated over a device lifetime
and latched retry_setup_failed after three cumulative failures. Reset it
when the device comes up.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 5379d034e0 wifi-scripts: fix VLAN key for service-injected wifi-iface
Service data VLANs were stored under vif_data.vlans, but every consumer
reads vif.vlan, so per-VLAN config from a procd service was silently
dropped. Use the singular key, matching the adjacent station handling.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 39507969ff wifi-scripts: return the interface-creation result from wdev_add
wdev_add() dropped the wdev_create() result, so every caller's error check
was dead and an nl80211 NEW_INTERFACE failure was silently ignored (hostapd
and wpa_supplicant then proceeded on a missing netdev with stale MLD
bookkeeping). Return the result.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 1a58efdb5d hostapd: ucode: fix dead reload-all check in mld_set_config
new_config was tested against the freshly emptied new_mld object, so it was
always false and the reload-all-interfaces block never ran. Test the
incoming config instead, so the first MLD config re-adds the spliced-out
MLD BSSes.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau f536d79fcd hostapd: ucode: force restart on unresolvable static BSSID conflict
The guard meant to bail to a full restart read `!mac_idx < 0`, which parses
as `(!mac_idx) < 0` and is always false, so a static BSSID colliding with
the first (or a foreign-owned) BSS fell through and reassigned the wrong
BSS's address. Use `mac_idx <= 0`.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:22 +02:00
Felix Fietkau 28c6f5e6f7 wifi-scripts: fix extended-feature bit test
device_extended_features() used bitwise OR instead of AND, so every
extended-feature query returned true regardless of the driver bitmap:
ftm_responder and radar_background were always reported present.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 5917907471 wifi-scripts: do not report a disabled wifi-device as up
A disabled wifi-device is intentionally still run through the setup path
(with no interfaces) to reliably tear down hostapd/wpa_supplicant and to
handle disabled/enabled flapping, so it reaches state "up" and status
reported up: true alongside disabled: true. Exclude disabled devices from
the up state in status instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau e7cf46369b hostapd: ucode: clear start_disabled when reloading a started BSS
On a radio shared with a STA every AP BSS is generated with
start_disabled=1. A smart reload that takes the full bss.set_config() path
restarts the BSS but never cleared start_disabled, so hostapd_start_beacon()
skipped beaconing and the AP went silently quiet until an unrelated
apsta_state event. Clear it when the BSS was already started, matching the
add_bss path.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 5b47cec245 wifi-scripts: emit a raw 64-hex PSK unquoted for station mode
A 64-character hex PSK was always quoted, but wpa_supplicant rejects a
quoted passphrase longer than 63 characters, so the network block failed
and the STA never associated while netifd still reported the radio up. Emit
the key unquoted when it is a 64-character raw PMK, matching the AP path.
The sae_password branch keeps quoting, as SAE passwords are arbitrary
strings.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 830ae67b44 wifi-scripts: honour a cancelled setup when the handler reports up
stop() and destroy() set cancel_setup while a setup handler is running, but
nothing read it, so a device brought down (or removed) mid-setup still went
up and stayed up, holding its interface links. Check the flag (and
autostart/delete) in wdev_mark_up and tear the device down instead of
completing the up transition.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau f3ff33c8a9 hostapd: ucode: fix per-station PSK list parsing in sta_auth
Two defects handling the psk array returned by an auth handler: strlen()
ran before the string was validated (strlen(NULL) on a non-string entry),
and the hex-PMK branch tested the array length instead of the entry length.
A 64-character passphrase therefore reached the passphrase branch and its
memcpy of str_len + 1 overflowed passphrase[MAX_PASSPHRASE_LEN + 1] by one
byte. Validate the type first and branch on the string length.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau eb5ccabf0e wifi-scripts: fix undeclared variable in service wifi-device injection
The wifi-device injection path used object shorthand `name` where no such
variable is in scope (the loop binds radio/config), so under the strict VM
config_init threw and the whole wireless configuration for that reload was
skipped. Use the radio key as the device name.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 06a7b0245f hostapd: ucode: handle null config in iface_set_config again
config_reset and shutdown call iface_set_config(name) with no config, but
the null-config guard was dropped in the MLO rework, so config.phy
dereferenced null and threw: config_reset reset nothing and shutdown left
hostapd-created interfaces behind. Restore the guard, removing the stale
config entry and tearing the interface down via iface_config_remove.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau c6d20bbf51 hostapd: ucode: restart on config-initiated channel switch failure
iface.switch_channel() only reports whether a CSA was started, not whether
it completed, so a config-driven channel switch that the driver never
finishes would leave the AP stuck without recovery. After issuing the CSA,
arm a timer and, if the switch has not completed by the deadline
(csa_in_progress still set), fall back to a full interface restart. The
timer is armed only on the config-initiated path, so ubus- and
apsta-triggered channel switches keep their own recovery.

Add an iface.csa_in_progress() ucode method wrapping hostapd_csa_in_progress().

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 55b9263596 hostapd: ucode: apply channel/width changes via CSA instead of restart
A config change that only alters the channel or channel width previously
failed the radio comparison in iface_reload_config() and forced a full
interface restart, disconnecting every client. Classify the radio diff:
apply a channel/width-only change through iface.switch_channel() (CSA) so
clients stay associated, keep the full restart for any other radio change.

When a co-located STA on the same band owns the runtime channel
(#channel_owned_by_sta), the change is a no-op on the AP side, which keeps
following the STA via apsta_state. MLD APs and DFS targets fall back to a
full restart, as a single iface-level CSA cannot handle them.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau b0d8ab4fef wifi-scripts: emit frequency and STA-channel markers in hostapd config
Emit #frequency (the target channel frequency, already computed during phy
setup) and #channel_owned_by_sta (set when a co-located STA/mesh/adhoc on
the same band dictates the runtime channel) into the generated config.
The hostapd daemon uses these to decide whether a channel change can be
applied via CSA instead of a full restart.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 247595eac1 hostapd: ucode: parse frequency and STA-channel radio markers
Lift the #frequency and #channel_owned_by_sta markers (emitted by the
config generator) onto config.radio and keep them out of radio.data so
they do not perturb the radio comparison. These feed the config-driven
channel switch handling added next.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau a2c5be2783 hostapd: ucode: compute 6 GHz segment centre in iface_freq_info
On 6 GHz there is no HT Operation IE, so a 0 secondary-channel offset made
freq_info() return without a segment centre frequency, leaving wide-channel
switches (80/160/320 MHz) on the stale centre. Pass a null offset for wide
6 GHz channels so the centre is auto-derived.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau c5c316b0ab hostapd: ucode: support 320 MHz in freq_info
uc_wpa_freq_info() rejected any operating width above 160 MHz, returning
null for EHT320 (width 3). Add the 320 MHz case; the existing segment-0
centre arithmetic (8 << width / 4 << width) extends correctly to width 3.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau b92df1e8da hostapd: ucode: fix CSA bandwidth for 320 MHz and 80+80 channels
switch_channel computed the CSA bandwidth as 40 << oper_chwidth, which
mismaps oper_chwidth 3 (80+80, must be 80 MHz plus center_freq2) to 320
and 9 (320 MHz) to 20480. Map the operating channel width to the actual
MHz bandwidth explicitly.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-16 11:50:21 +02:00
Felix Fietkau 79d2cf8820 udebug: update to Git HEAD (2026-07-08)
91591e698dac lib-ucode: fix heap buffer overflow in trace ring allocation
7530cc1d2bb2 lib-ucode: open kernel trace_pipe non-blocking
2fcb035141da lib-ucode: grow trace fetch buffer to fit oversized lines
c670cc4f9acc lib-ucode: close trace_pipe fd on trace ring error path
7690e66e6e08 udebug-cli: handle kernel trace buffer open failure
75843a1bfcc9 lib-ucode: avoid infinite loop on oversized trace lines

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 16:10:54 +02:00
Felix Fietkau c5854d65f2 netifd: update to Git HEAD (2026-07-08)
c0abf80df1c1 config: fix NULL pointer dereference when typed device creation fails
4a19d2568c0b device: migrate alias users when replacing a device
e2f28e5ec0a8 interface: defer interface removal to avoid use-after-free
34760f2aec34 interface: fix alias handling when the parent interface does not exist
0bab70f05296 bridge: cancel the member retry timer on teardown and free
a562a8eca41d bridge: fix memory leak of hotplug member vlan ranges
4c7b3f7caf88 proto-ext: clear the proto task kill flag when starting a new task
8a38aecd84de system-linux: include the priority when deleting ip rules
844c0fe78eed device: remove unused __devlock counter
dbdf0d0e5830 system-linux: initialise FMR prefix lengths before parsing
fb456b5e65df iprule: keep unchanged rules installed on reload
7d8f9900c273 vrf: sync changes with bonding.c/bridge.c
f0db4101c1ea vrf: remove incorrect IPv6 disable on VRF ports
9dfea5b242b2 vrf: remove unused vrf_empty field
6f6bf8bec23b vrf: rename vrf_state_type to vrf_device_type
37c770a6b86d vrf: add license header
35171a157516 system-linux: fix system_vrf_addif retry loop
6cbcc107e984 bonding: cancel the port retry timer on teardown and free
787848926a19 extdev: fix invalid frees and unwind order on handler registration failure
2a8ed44dc613 interface-ip: fix address family check when removing offlink null-routes
576e1f3de154 interface-ip: preserve subnet route state when keeping an address
10f25df801c1 bridge: fix parsing of the stp_kernel option
3132f007ebf0 bonding: skip present toggle in bonding_free_port() when device is active
24950e564fff bonding: fix stale primary_port pointer after port enable failure
4c8374dc0f79 interface: fix zone string leak on config reload
65e96ba990b2 ubus: fix netns fd leak in netns_updown error path
fa9ee5efd4b2 utils: fix out-of-bounds fallback in uci_get_validate_string
6ccbf71d7a97 utils: fix false positives and dead branch in check_pid_path
3ec503831ebd iprule: default src/dest masks to the host prefix length
9a520edc3be4 system-linux: implement the neighbour flush in system_if_clear_entries
62b6256bf95c system-linux: fix vxlan link creation with gbp disabled
6c0a837f10fc system-linux: fix rtnl socket desync when clearing kernel entries
d1a0ceb71991 macvlan: fix NULL dereference when dumping a device without parent
937c3aa801af vlandev: fix NULL dereference when dumping a device without parent
89025924ba51 vlan: fix device chain lookup for names with a non-vlan separator
c961d1e16814 vlan: fix rejection of maximum length vlan device names
1cbf89e3108c vlandev: fix type of vlan alias lookup result
08a4a7b33056 proto-ext: fix stuck state machine when the setup script fails to launch
c8c8b79a5bcb proto-ext: queue restart requests while a script task is running
0c990ce2ca09 ubus: report failure from the interface restart method
e6af4a5bf6f2 interface: fix undefined shift when computing the ip6hint mask
67f8107fb21c interface-ip: fix undefined shifts in prefix assignment arithmetic
903bd1c3daa5 interface-ip: fix out-of-bounds access in clear_if_addr for zero masks
56ffff895672 system-linux: fix ethtool feature block count
bbc818a6527f system-linux: fix EINTR retry in read_string_file
9c2970832d8f system-linux: fix off-by-one in vxlan VNI validation
c5b5d54ce2f9 bridge: validate the upper bound of hotplug vlan ranges
1595cd7b25da main: handle execvp failure on restart
24b2703171fe handler: guard against zero-length lines when parsing handler dumps
c2b760fc7cc5 handler: free glob results in netifd_init_extdev_handlers
60e3243bdcd8 handler: reject negative parameter types in handler descriptions
274b1594e0ca interface-ip: tear down the ULA prefix on an invalid prefix length
e692ec77d51b interface-ip: expire config routes with a valid option
684dc2d50902 device: fix error handling in device_create
c02101330247 interface: fully clean up partially constructed interfaces on free
1db485d6a39c handler: clear parameter list pointers on parse failure
5694c49f964f system-linux: stop receive loops on netlink errors
d108c504df4e system-linux: fix bogus master ifindex result for non-DSA devices
d6f609170f1e system-linux: fix swapped rx/tx in negotiated pause reporting
8a19380586ef extdev: fix NULL pointer dereference when parsing stats params
a1cc96488c02 extdev: fix memory leaks on device free
d2085a59abbc extdev: fix bridge config leak on no-op reload
4d1a4ae487b6 ucode: close pipe read end in spawned child processes
6c407410259c config: validate bridge vlan port and alias attributes
8afd58bead2f bridge: fix pvid clearing leaking to other vlan members
e8edb3f78652 bonding: fix port failure accounting in bonding_enable_port
6088f7b3b9d7 system-dummy: fix metric clobbering device name in route debug output

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 10:48:43 +02:00
Felix Fietkau 2fb1afa761 libubox: update to Git HEAD (2026-07-08)
e2fa9dcf67a8 uloop: fix use-after-free when cancelling interval timers
329d823294a0 uloop: keep signal handler installed while other watchers remain
3362b39a1c03 kvlist: fix use-after-free when updating an entry in place
b33f74af02b2 list: define list_prev_entry used by list_for_each_entry_continue_reverse
65f62583c236 udebug: check hdr before dereferencing it in set_start_time
9d7fb82530b5 udebug: reject non-power-of-two ring metadata from a peer
2e0e7f0f4d38 udebug: verify shared-memory fd size before mapping
dda814a9750a usock: retry poll() on EINTR in usock_wait_ready()
72e2b396bd9a ustream: reset byte and buffer counters when freeing buffers
be161d0320da utils: guard cbuf_order against zero and one
08081477ad6c uloop: fix kevent() eventlist size argument in register_kevent
0c3eec553828 uloop: fix kqueue timer interval arithmetic
a9ab90bd1d5d uloop: fix use-after-free in signal_consume when a callback deletes a watcher
c08a4ab53129 uloop: fix use-after-free in uloop_handle_processes when a callback deletes a process
7677b7a4f3a4 vlist: pass the tree as comparator context in VLIST_TREE_INIT

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-08 10:48:43 +02:00
Felix Fietkau 7987b1f799 ucode: fix two compiler issues
- When working with deeply nested imports, compile errors led to long
  error messages or complete hangs by compiling the same module over
  and over again.
- Fix for a function expression scope issue.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-07 10:46:12 +02:00
Felix Fietkau 8bbaad10e0 build: support git-src override for host builds
Extend the git-src source tree override to host builds. It is opt-in via
HOST_USE_GIT_SRC, since by default the host build keeps using the tarball.

Move the git-src detection and checkout recipe into unpack.mk so both the
target and host build reuse the same code.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-07 10:46:12 +02:00
Felix Fietkau 638a1927b1 mt76: update to Git HEAD (2026-07-01)
50a0c3057575 firmware: update MT7986 firmware to version 20260515
6b7b98627bcc wifi: mt76: mt7915: HW ATF support for mt7986+
910db36ae5b1 wifi: mt76: mt7996: HW ATF support
f6cf5faff4b6 firmware: update MT7996 firmware to version 20260311
fe40221e05eb wifi: mt76: mt7996: fix EAPOL source BSS for non-MLD stations
59676919ea40 wifi: mt76: mt7996: fix non-MLD station num_sta leak

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-01 13:15:44 +02:00
Felix Fietkau 365c6232c0 qosify: update to Git HEAD (2026-06-22)
298754f6ded2 map: add NQB DiffServ codepoint
d26cc573f36c qosify: account for bytes in traffic class statistics
0edbc51af3b6 qosify: group traffic class stats under a "classes" table
fe8491da8daf qosify: add per-DSCP traffic statistics
181a691407ee dns: track cname cache hit/miss statistics
cece4e23a9df qosify: track per-DNS-pattern traffic statistics
6b4be193a6dd qosify: report eBPF map entry count and last reload time
e57b34046341 qosify: account for GSO segment count in packet statistics
c49e72a4a45d qosify-bpf: remove unused variable in classify()
44ce40f8e083 qosify: count all traffic in per-DSCP statistics
beeb87ec1f16 qosify: expose default traffic classes in statistics

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-07-01 13:15:44 +02:00
Felix Fietkau 92143f94b6 mac80211: notify driver on airtime weight changes
Add a new sta_set_airtime_weight driver op so drivers can program the
airtime fairness weight into hardware.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-30 13:56:29 +02:00
Felix Fietkau 7dd4779183 wifi-scripts: fix disabled vif tracking using wrong dictionary key
wdev_update_disabled_vifs() indexed the disabled_vifs map with the wdev
object instead of the vif name. The map is read back via
disabled_vifs[vif.name], so disabled vifs were never matched, and
coercing the wdev object into a string key triggered an infinite
escaping loop in ucv_to_string_json_encoded() during state output,
causing OOM on reboot.

Suggested-by: Shayne Chen (陳軒丞) <Shayne.Chen@mediatek.com>
Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-26 19:01:46 +02:00
Felix Fietkau a1ab701efa mediatek: openwrt-one: make the front button usable as WPS button
It's the most common use for such a button, and the behavior can
be changed in user space if needed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 15:52:19 +02:00
Felix Fietkau e40458a2ff mt76: remove obsolete patches
Already included in the last update

Fixes: a0c5a58123 ("mt76: update to Git HEAD (2026-06-23)"
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 12:33:34 +02:00
Felix Fietkau a0c5a58123 mt76: update to Git HEAD (2026-06-23)
012e52ae3805 wifi: mt76: use hrtimer_setup() in mt76x02u beacon init
d2b01fbc329b mt76: pass LED define via ccflags-y
9a46d8d21d2a wifi: mt76: add PS buffering support for HW-managed TIM drivers
9e613fb007f5 wifi: mt76: mt7915: handle MCU PS sync events
b0af99f238f7 wifi: mt76: mt7996: handle UNI PS sync events
34064bd58bb3 wifi: mt76: mt7925: clean up DMA on probe failure
4ab8f2122dcb wifi: mt76: disable rx napi before queue cleanup
381582f2a5de wifi: mt76: mt7996: avoid memset overwriting tx_info->control.flags
d463ed9490ab wifi: mt76: mt7921: fix resource leak in probe error path
dd1459c0c708 wifi: mt76: mt7921/mt7925: fix NULL dereference in CSA beacon
6ae6f2b58cf5 wifi: mt76: route TDLS-peer frames as 3-addr non-DS in HW encap
0753cf183d8c wifi: mt76: mt7925: don't disable AP BSS when removing TDLS peer
fe0555feb30a wifi: mt76: use kfree_rcu for offchannel link in mt76_put_vif_phy_link
97fc0e785d0e wifi: mt76: mt7921: fix uninitialized variable warning
49a0aa659f7b wifi: mt76: drop redundant device reference
a4f3781dea07 wifi: mt76x0u: drop redundant device reference
52071e885528 wifi: mt76x2u: drop redundant device reference
0aca66c123f8 wifi: mt76: mt792xu: drop redundant device reference
5c94494f1b8d dma.h: add missing variable initialization
756b1c67eb3b wifi: mt76: mt7925: add Netgear A8500 USB device ID
58331e62df80 wifi: mt76: mt7996: Fix NULL pointer dereference in mt7996_init_tx_queues()
bd493e29f7e0 wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links
3c575281716f wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv
b1f7e240c717 wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS
06277d860b3d wifi: mt76: mt7925: populate EHT 320MHz MCS map in sta_rec
70bfd49d255a wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band
fda04bb435fa wifi: mt76: mt7925: add MT7927 chip ID helpers
6e5802e93dfb wifi: mt76: mt7925: add MT7927 firmware paths
8175695dcd5e wifi: mt76: mt7925: use irq_map for chip-specific interrupt handling
f698c7f22569 wifi: mt76: mt7925: disable ASPM and runtime PM for MT7927
1f91523cb928 wifi: mt76: connac: replace is_mt7925() with is_connac3()
9342a017992d wifi: mt76: mt7925: use link-specific removal for non-MLD STA
3969bb117161 wifi: mt76: connac: tolerate inactive BSS deactivation
d045c72b294c wifi: mt76: mt792x: add MT7927 WFSYS reset support
b81028de36e8 wifi: mt76: mt792x: factor out common DMA queue allocation
903f8b3bfa02 wifi: mt76: mt7925: switch DMA init to common mt792x queue helpers
79e061f30b0c wifi: mt76: mt792x: add MT7927-specific PCIe DMA support
3e55b6595da9 wifi: mt76: mt7925: sync MT7927 BSS band assignment
b8e20dc9c221 wifi: mt76: mt7925: add MBMC event handling
049633e34b79 wifi: mt76: mt792x: enable CNM ops for MT7927
8a7d31ac92b0 wifi: mt76: mt7925: add MT7927 PCIe support
62956aec1615 wifi: mt76: mt7925: add MT7927 USB support
4ed651794a7f wifi: mt76: mt7925: keep TX BA state in the primary WCID
6cdcb480f32b wifi: mt76: mt7925: pass WCID explicitly to mt7925_mcu_sta_ba()
f142a55342a4 wifi: mt76: mt7925: program BA state on active links
3e54e1c80079 wifi: mt76: mt792x: skip MLD header rewrite for 802.3 encap TX
e588dc4843ab wifi: mt76: mt7925: validate skb length in testmode query
2802466a9440 wifi: mt76: mt7915: validate skb length in txpower SKU query
d8fc8629f2bc wifi: mt76: mt7996: Fix possible token leak in mt7996_tx_prepare_skb()
652740d6f12e wifi: mt76: mt7996: Fix possible NULL pointer dereference in mt7996_mac_write_txwi_80211()
f5f14a017454 Revert "wifi: mt76: disable rx napi before queue cleanup"
1e7ac9bf7764 Revert "wifi: mt76: mt7996: avoid memset overwriting tx_info->control.flags"
934f64710479 wifi: mt76: mt7996: fix reading zeroed info->control.flags after mt76_tx_status_skb_add()
1ba5cc4b4023 wifi: mt76: mt7925: drop redundant chandef.chan NULL check in MT7927 path
02934c3d0726 wifi: mt76: mt7996: remove redundant pdev->bus check in probe
2ab649809db7 wifi: mt76: add wcid publish check in mt76_sta_add
7825972b0a3c wifi: mt76: transform aspm_conf for pci_disable_link_state
c0e41eb57d96 wifi: mt76: mt7996: reduce phy work in set_coverage
e640565e0701 wifi: mt76: mt7996: limit work in set_bitrate_mask
761478b9b1a3 wifi: mt76: connac: use a helper to cache txpower_cur
1e05654e6aec wifi: mt76: connac: factor out rate power limit calculation
994443de60ba wifi: mt76: mt792x: report txpower for the requested vif link
600dbf123399 wifi: mt76: mt792x: add common USB transport reset helpers
91f19ba39348 wifi: mt76: mt7921u: escalate broken USB transport to device reset
03644ac19f9a wifi: mt76: fix argument to ieee80211_is_first_frag()
cd931f9e5fa6 wifi: mt76: mt7996: disable UNI_BSS_INFO_PROTECT_INFO for mt7996
fc890d5b3603 wifi: mt76: mt7921: refactor regulatory domain handling to regd.[ch]
1ec0abf5d9aa wifi: mt76: mt7921: refactor CLC support check flow
cd3d2a68c90c wifi: mt76: mt7921: refactor regulatory notifier flow
06d1ccbecd50 wifi: mt76: mt7921: add auto regdomain switch support
4fb4a076256f wifi: mt76: mt7921: disable auto regd changes after user set
748311faa56c wifi: mt76: mt7915: fix potential tx_retries underflow
ee2bb3337274 wifi: mt76: mt7921: fix potential tx_retries underflow
e791fb66e47c wifi: mt76: mt7925: fix potential tx_retries underflow
9f60dd01e62c wifi: mt76: mt7996: fix potential tx_retries underflow
a3bf7dac3e58 wifi: mt76: mt7921: assert sniffer on chanctx change
72d8dc857443 wifi: mt76: Drop unneeded mt76_register_debugfs_fops() return checks
f8b59ca3be7b wifi: mt76: don't pin undrainable PS stations in the tx scheduler
2dd6e4c8892f firmware: update MT7981 firmware to version 20260515

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 11:22:26 +02:00
Felix Fietkau 8c613a9a22 base-files: derive DHCP DUID from device MAC address
The DUID-UUID was generated from a random UUID, which is regenerated on
every fresh flash and therefore does not survive reconfiguration events
such as reflashing without keeping the configuration. RFC8415/RFC6355
prefer a DUID that remains stable across such events.

Add a ucode helper that picks the first LAN port (falling back to WAN)
from /etc/board.json, resolves its MAC address and derives a stable UUID
from it, falling back to a random UUID only when that fails.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 11:21:28 +02:00
Felix Fietkau 2010cfde39 procd: update to Git HEAD (2026-06-17)
9ff6e43bb75f service: notify instance exit details via ubus
4f42296dc4f0 jail: mount rootfs overlay with userxattr in user namespace
60fdbf00e924 jail: chown rootfs overlay dir to mapped root in user namespace

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 11:21:28 +02:00
Felix Fietkau c32059b383 netifd: update to Git HEAD (2026-06-16)
abfaaac65929 netifd: fix const-discard warnings in attr/devtype parsing
52c7db3a2beb bridge: remove kernel member on teardown regardless of device claim state
741fd3c162df bridge: attempt delbr unconditionally on bridge destroy
2909720f8cf1 system-linux: detach device from stale bridge before adding it
67f06ef1600a interface: detach hotplug members on reassignment
bb7f0a456dce interface-ip: skip offlink handling on point-to-point links
c1f9d4df847a system-linux: guard PSE port priority for older kernel headers
b087b0773366 build: prefer libnl-tiny and fix LIBNL detection on reconfigure
b0063715d7ea device: add broadcast_flood bridge port setting
973354a1a6f0 interface: add carrier_loss_delay option
d155e4cefbd9 interface: add restart support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-24 11:21:28 +02:00
Felix Fietkau 4b7d5538bc procd: update to Git HEAD (2026-05-22)
ac5cc72f6cfa jail: mount ucode related bits into netifd jail
81119d3f249d instance: disable console logging
8013c0cd2755 jail: mount tools used by dhcp.sh in the netifd jail
876981d0516d jail: fix reading the oci device gid value
c92dbcd460d7 jail: make /dev/tty accessible by others
74bfbee8adb8 service: fix calloc_a argument

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-03 11:18:29 +00:00
Felix Fietkau 76e6216c8a ucode: update to Git HEAD (2026-06-03)
1ac496a91a30 math: min and max
4c917958038d math: clamp
c6404b6af75c math: sign functions
597b17d0edea math: copysign
9747c8bbfa27 math: floor
933b11802060 math: ceil
46581cf13149 math: round
4aee92d5aa89 math: trunc
c8f71433a3d6 math: log functions
840aa6e61196 math: Infinity handling note
990558c2a027 math: isinf
c3e76e45fdad math: tan
08c6ef98fa2f math: acos, asin, atan
21a0f37d4c7c math: cosh, sinh, tanh
28ec6e4466b5 math: cbrt, hypot
fb2fc094875c math: expm1, log1p
1a911dbc72b0 math: jsdoc fixes
7b3b15dc7d25 math: add double/int output toggle flag to floor/ceil/round/trunc
7424c3bd14e0 make: improve make (install) on macOS
965d76557dee types: release previous prototype reference in ucv_prototype_set
b702323ec137 uloop: unregister task output fd from uloop before closing it
106b1179765a uloop: clear resource values when releasing callback resources
acc70db934fc ubus: clear resource values when releasing connection/object resources
9d7ade9e4c68 ubus: prevent UAF when channel disconnect_cb triggers re-entrant disconnect

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-06-03 13:13:17 +02:00
Felix Fietkau 36471ac3e4 mac80211: add ieee80211_txq_aql_pending()
Add a function to allow drivers to query the pending AQL airtime
for a given txq, for both unicast and broadcast.
This will be used for mt76 to limit buffering in AP mode for power-save
stations.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-27 12:27:21 +02:00
Felix Fietkau 74da669505 umdns: update to Git HEAD (2026-05-22)
bd7599d02157 fix calloc_a size argument type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:56:09 +02:00
Felix Fietkau 4136443864 unetd: update to Git HEAD (2026-05-22)
090abf9a5521 host: fix type mismatch on calloc_a calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
Felix Fietkau e7530a287a build: fix apk_package_files wildcard for packages without ABI version
The wildcard combined an apk_package_files pattern of $(pkg)-*.apk with a
gen_package_wildcard that ends in [^a-z]*, so the full glob required two
dashes. Files for packages without an ABI version (e.g. ubbf-0~....apk)
only contain one dash and never matched, so ipkg-remove was never called
on them and stale .apk files accumulated in the bin directory.

Drop the explicit dash from apk_package_files. The [^a-z] in
gen_package_wildcard already serves as the dash matcher, and
scripts/ipkg-remove filters precisely by reading apk metadata.

Fixes: 642d568b0f ("build: fix ipkg-remove: add support for removing apk files")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-22 14:54:34 +02:00
Felix Fietkau a6969351a7 hostapd: clear start_disabled when adding a BSS to an enabled iface
In AP+STA mode, wifi-scripts emits start_disabled=1 in the per-BSS
section of the generated hostapd config so that hostapd defers
beaconing on every BSS until apsta_state up clears the flag for the
whole iface (uc_hostapd_iface_start clears start_disabled on every BSS
and calls ieee802_11_set_beacon).

When a new BSS is added later via iface.add_bss while the iface is
already in HAPD_IFACE_ENABLED state, the freshly parsed config still
carries start_disabled=1 for that BSS. hostapd_setup_bss is invoked
with start_beacon=true, but hostapd_start_beacon then skips
ieee802_11_set_beacon because conf->start_disabled is set. The kernel
netdev is created without ever starting beacons, the carrier never
comes up, and probe-response transmission attempts fail with
"handle_probe_req: send failed".

Mirror what iface.start does: when the iface is already enabled, the
apsta channel selection has happened, so clear start_disabled for the
incoming BSS before starting it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-04 16:29:37 +02:00
Felix Fietkau a86da0bd1e hostapd: emit ubus key-mismatch event for SAE confirm failures
Surface SAE confirm mismatches (wrong password) through the same
key-mismatch ubus notification that is already used for PSK failures, so
consumers can react uniformly regardless of the authentication method.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-04 16:29:37 +02:00
Felix Fietkau 94fc66cce9 hostapd: avoid spurious interface reload on empty MLD config
mld_set_config() treated any call with empty prev_mld as a fresh
configuration and triggered a full Reload all interfaces, even when the
new config was also empty (the typical path on non-MLD devices).
Reloading every BSS on each netifd reconf disrupted associated stations
including PMF-protected backhaul STAs, which would self-deauth after the
SA Query timeout.

Only treat the call as a new configuration when the new config is
actually non-empty.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-04 16:29:36 +02:00
Felix Fietkau 572fb14e7e kernel: remove ax25
It is going away upstream and it's highly unlikely that there are any
users left.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-04 16:29:36 +02:00
Felix Fietkau 4ae4759e0b ucode: update to Git HEAD (2026-04-24)
3d999b21f4ba socket: add include for older kernels
552ca3cf55ed compiler: allow export function declarations without trailing semicolon
d9e24e4ad13d compiler: add function forward declaration syntax
de986520017a fs: add statvfs flags and fs error codes
e6bf0a9dca79 nl80211: fix listener.request() dropping multicast events
520d9f4c8781 nl80211: fix waitfor() busy-spinning on non-blocking event socket
05328e33f078 nl80211: fix memory leak in waitfor() on repeated matching events
e4a165976dbb nl80211: don't report waitfor() match on event parse failure
57367e880e9d nl80211: add missing survey info attributes
a39b74fe329e nl80211: fix dfs_cac_time attribute type
beafcff845fc compiler, lib, resolv: fix const string pointers
4170c8dcc568 lib: fix system() inheriting blocked SIGCHLD mask in child process
d2c74298e22d fs: document glob
8a8b4d12a867 types: fix regexp `/.../s` flag inversion
d7bc7adcb99d lib: slightly expand regexp() JSDoc
826fbfef2df9 nl80211: fix HE MCS set parsing
617967a3ceb9 socket: strip brackets from IPv6 addresses in addrinfo()
a078b72a90bb socket: increase IPv6 scope ID buffer to support 15-char interface names
ed23cf5aa182 rtnl, nl80211: fix segfault when listener.close() is called explicitly
3e585662394b docs: add function forward declarations to syntax tutorial
bda4a0e454de vm: free thread context on vm_free to prevent memory leak
13158a73c96b nl80211: get iftype extended capabilites
30ffbd6c07dc ubus: add module documentation
ce0c8fc0ffea docs: spelling fixes and usage notes
35a74e92ad69 docs: rewrite ubus module intro to expand pub/sub and fix OpenWrt capitalization
b3380068a7e1 docs: flatten ubus class hierarchy and fix capitalization
3c9d3b5272d7 docs: math: fix spelling mistakes in documentation
aae2250ab519 fs: fix popen() documentation
eff52f0d262a digest: implement FNV-1a 64 bit hash algorithm
35ed1d1efd64 ubus: fix refcounting bug
c7e7dfa7b64a ubus: avoid double close of externally owned channel fds
896ac72caffb tests: make run_tests.uc default to build/
b50372e8e8a0 tests: implement automatic library test skipping
81066c54a07f math: degrees <-> radians convertors
388ef3f35e0a ubus: drop unconditional garbage collection calls
aebdb2c0262e main: fix option argument parsing on glibc

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-05-04 16:29:36 +02:00
Felix Fietkau 53931f03dd wpa_supplicant: include ctrl-event on the DPP channel
Simplifies managing state

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-04-05 15:00:12 +00:00
Felix Fietkau 14145abcb2 wpa_supplicant: add ifname to recieved ctrl-event notifications
Simplifies subscribing to multiple objects.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-04-05 15:00:12 +00:00
Felix Fietkau 714f657f3f netifd: use procd_add_reload_data_trigger
Reload config if any network or wifi interfaces/devices were changed
via procd data.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-27 20:04:04 +01:00
Felix Fietkau 95e2b3e9b8 procd: add support for multiple arguments to procd_add_reload_data_trigger
This allows triggering on multiple types of procd data changes for
config reload.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-27 20:04:04 +01:00
Felix Fietkau 55a6831eee wifi-scripts: add support for passing uuid to hostapd
This is needed to maintain a shared WPS device UUID across radios.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-27 20:04:04 +01:00
Felix Fietkau befa61b1b6 bridger: update to Git HEAD (2026-03-23)
de7e00a5a673 flow: Fix vlan forwarding check with vlan filtering disabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00
Felix Fietkau 6c12207ff0 mt76: update to Git HEAD (2026-03-21)
a665659dee50 wifi: mt76: fix beacon monitor for MBSSID nontransmitted BSS
1b26f5f63d42 wifi: mt76: mt7996: Decrement sta counter removing the link in mt7996_mac_reset_sta_iter()
0c1dedac48c3 wifi: mt76: mt7996: Switch deflink to seclink only if link lookup does not fail
7fa21be01b97 wifi: mt76: mt7996: Rely on msta_link link_id in mt7996_vif_link_remove()
492a407111c3 wifi: mt76: mt7996: Account active links in valid_links fields
ade83e44eda0 wifi: mt76: mt7996: Move mlink deallocation in mt7996_vif_link_remove()
efebeea5c058 wifi: mt76: mt7996: Destroy vif active links in mt7996_remove_interface()
a4c790aef40d wifi: mt76: mt7996: Add mcu APIs to enable/disable vif links.
018f60316d4d wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00
Felix Fietkau 68a35447d9 ucode: nl80211: fix HE MCS parsing
Do not parse an u8 array as u16.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-23 10:57:16 +01:00
Felix Fietkau 2f1537443f mt76: update to Git HEAD (2026-03-19)
b7d6e434382a wifi: mt76: add offchannel check to mt76_roc_complete
35e79a5bb199 wifi: mt76: check chanctx before restoring channel after ROC
42955db08adf wifi: mt76: abort ROC on chanctx changes
273c6f60cc8e wifi: mt76: optimize ROC for same-channel case
b451ffe2c0c1 wifi: mt76: send nullfunc PS frames on offchannel transitions
757d4404487d wifi: mt76: flush pending TX before channel switch
da6d90e4f66a wifi: mt76: route nullfunc frames to PSD/ALTX queue
447cc8c89c17 wifi: mt76: wait for firmware TX completion of mgmt frames before channel switch
fb6a584e7119 wifi: mt76: add per-link beacon monitoring for MLO
ab6abc97132b wifi: mt76: fix scan work requeue race with spinlock
d2b1e1aa8ec4 wifi: mt76: do not free skb on ieee80211_tx_prepare_skb failure
94017d560bad wifi: mt76: mt7996: Remove link pointer dependency in mt7996_mac_sta_remove_links()
754e3af4d131 wifi: mt76: mt7996: Fix deflink lookup removing links
42964c80d2d7 wifi: mt76: mt7996: Fix deflink lookup adding links
a87f63e269e4 wifi: mt76: mt7996: Remove unnecessary phy filed in mt7996_vif_link struct
ca058da77830 wifi: mt76: mt792x: describe USB WFSYS reset with a descriptor
2e2962f9e19e wifi: mt76: mt792x: fix mt7925u USB WFSYS reset handling
82c56dd7c1ec wifi: mt76: mt7996: fix RRO EMU configuration
616439131793 wifi: mt76: mt7996: support critical packet mode for MT7990 chipsets
9b6cc2ba6625 wifi: mt76: mt7996: update WFSYS reset flow for MT7990 chipsets
4edbdf38c68e wifi: mt76: mt7996: adjust timeout value for boot-up calibration commands
b4ec73b3355e wifi: mt76: mt7996: fix the temporary buffer for calibration-free data
3a16c78c9e06 wifi: mt76: mt7996: fix issues with manually triggered radar detection
bada63e285ad wifi: mt76: mt7915: set mt76 specific PS flag
99e8e3cb9804 wifi: mt76: mt7925: pass mlink to sta_amsdu_tlv()
f716cf9b6e16 wifi: mt76: mt7925: pass WCID indices to bss_basic_tlv()
aac117362eed wifi: mt76: mt7925: pass mlink and mconf to sta_mld_tlv()
dce1e6e4ceca wifi: mt76: mt7925: pass mlink to mcu_sta_update()
b7fee4e5e5b4 wifi: mt76: mt7925: resolve primary mlink via def_wcid
130184621d20 wifi: mt76: mt7925: pass mlink to mac_link_sta_remove()
ea1a80f7cf5e wifi: mt76: mt7925: pass mlink to sta_hdr_trans_tlv()
5eb53c948beb wifi: mt76: mt7925: validate mlink in sta_hdr_trans_tlv()
6e66c08ac0c6 wifi: mt76: mt7925: pass mlink to wtbl_update_hdr_trans()
826ecd386bf0 wifi: mt76: mt7925: pass mlink to set_link_key()
3b1e74d14b4e wifi: mt76: mt7925: resolve link after acquiring mt76 mutex
6c64c41fccec wifi: mt76: mt7925: pass mconf and mlink to wtbl_update_hdr_trans()
215e122415d4 wifi: mt76: mt7925: make WCID cleanup unconditional in sta_remove_links()
98cb4c0f5d7c wifi: mt76: mt7925: unwind WCID setup on link STA add failure
471d6b3404c8 wifi: mt76: mt7925: drop WCID reinit after publish
9cbcc7e59d32 wifi: mt76: mt7925: move WCID teardown into link_sta_remove()
9fbe29ba429e wifi: mt76: mt7925: switch link STA allocation to RCU lifetime
8be727730640 wifi: mt76: mt7925: publish msta->link after successful link add
2cdcad1bb688 wifi: mt76: mt7925: host-only unwind published links on add failure
24c298a04f09 Revert "wifi: mt76: mt7915: set mt76 specific PS flag"
ca81c5c18ec8 Revert "wifi: mt76: mt7915: sync station power save state"
39c960c3ada5 wifi: mt76: mt7996: fix frequency separation for station STR mode

Fixes: https://github.com/openwrt/mt76/issues/1068
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 13:35:00 +01:00
Felix Fietkau a19cdb1a95 hostapd: ubus: fix parent-tsf size in beacon report notification
parent_tsf in struct rrm_measurement_beacon_report is le32 (32-bit),
but was being added with blobmsg_add_u16, truncating the value.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:57:26 +01:00
Felix Fietkau 1d98101743 hostapd: ubus: add missing token to beacon report notification
The beacon measurement token was not included in the ubus beacon-report
notification, causing consumers that need the token (e.g. for constructing
Beacon Metrics Response TLVs) to receive null.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:57:26 +01:00
Felix Fietkau a34c3baf56 mac80211: fix reporting MLO link ID for non-MLO STAs on MLO AP
Add missing information on station dump/get

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:57:26 +01:00
Felix Fietkau 5aea8e8916 hostapd: fix type mismatch in BSS transition responses
Use blobmsg_add_u32 for non-bool fields in order to avoid wrong
interpretations of the data on JSON/ucode conversion.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:57:26 +01:00
Felix Fietkau c5564ba071 hostapd: ubus: fix beacon request reporting detail field size
The Reporting Detail value is a 1-byte field, but was written as le16,
producing a 2-byte write that also contradicts the length field of 1
in the subelement header.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:57:07 +01:00
Felix Fietkau 0208089ded hostapd: ubus: fix beacon request buffer overflow with reporting detail
The reporting detail subelement (up to 3 bytes) was not accounted for
in the wpabuf allocation, causing a crash when reporting_detail is set
to a valid value (0, 1, or 2).

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-19 10:51:28 +01:00
Felix Fietkau ab0872a734 procd: update to Git HEAD (2026-03-11)
129b729f757c service: fix use-after-free in per-instance set_data handler

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-11 18:30:37 +01:00
Felix Fietkau 91cff1a6d3 apk: add --force-reinstall option
Allow reinstalling already-installed packages without a version change.
Only the named packages are reinstalled, not their dependencies.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-08 16:35:04 +01:00
Felix Fietkau 6c7dd69ce4 mt76: update to Git HEAD (2026-03-05)
1958eaf46fde firmware: update mt7992 and mt7996 firmware to the latest version
da6227dc3029 firmware: add mt7990 firmware
9f95baf93a07 wifi: mt76: mt7996: Add missing CHANCTX_STA_CSA property

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-05 18:06:00 +00:00
Felix Fietkau ba3c6ff302 mac80211: fix a crash triggered by CSA with AP VLAN enabled
Fix getting the correct operating channel for stations on VLAN

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-05 18:25:59 +01:00
Felix Fietkau ed66c2dfa3 mt76: update to Git HEAD (2026-03-01)
a47ad19275e9 wifi: mt76: mt7996: fix out-of-bounds array access during hardware restart
a34adb961be5 wifi: mt76: mt7996: add missing max_remain_on_channel_duration
751ae55c0d87 wifi: mt76: improve fix for multi-radio on-channel scanning
9337d2f25d91 wifi: mt76: avoid sending probe requests on active DFS channels
d62f5a0d1d2d wifi: mt76: update fix for backoff fields and max_power calculation
8831fa78cb23 wifi: mt76: add external EEPROM support for mt799x chipsets
f656567eff2c wifi: mt76: mt7996: add variant for MT7992 chipsets
36c59c31bfc8 wifi: mt76: mt7996: apply calibration-free data from OTP
f1c32003333e wifi: mt76: connac: use is_connac2() to replace is_mt7921() checks
95df5c591507 wifi: mt76: mt7921: use mt76_for_each_q_rx() in reset path
c3d742932a3c wifi: mt76: mt7921: handle MT7902 irq_map quirk with mutable copy
772c51c2ebc1 wifi: mt76: mt7921: add MT7902e DMA layout support
2175fa76bfff wifi: mt76: connac: mark MT7902 as hw txp devices
135ebed77517 wifi: mt76: mt792x: add PSE handling barrier for the large MCU cmd
cc343793ad65 wifi: mt76: mt792x: ensure MCU ready before ROM patch download
5ee904252aad wifi: mt76: mt7921: add MT7902 MCU support
4b104a082e72 wifi: mt76: mt792x: add MT7902 WFDMA prefetch configuration
eaa09af12bf4 wifi: mt76: mt7921: add MT7902 PCIe device support
66067d203bd0 wifi: mt76: mt7921: add MT7902 SDIO device support
f21748c6cdae wifi: mt76: mt7996: fix wrong DMAD length when using MAC TXP
88ed9f8abcf3 wifi: mt76: mt7996: fix struct mt7996_mcu_uni_event
19b5d0918ba1 wifi: mt76: avoid to set ACK for MCU command if wait_resp is not set
365f006322aa wifi: mt76: mt7996: fix queue pause after scan due to wrong channel switch reason
2eb5d1e3cfbf wifi: mt76: don't return TXQ when exceeding max non-AQL packets
3129d0a6b185 wifi: mt76: mt7915: fix use-after-free bugs in mt7915_mac_dump_work()
cb906c88ca92 wifi: mt76: mt7996: fix use-after-free bugs in mt7996_mac_dump_work()
4aa63d4c5bf2 wifi: mt76: mt7996: Add eMLSR support
be3aad4c2e10 wifi: mt76: mt7915: sync station power save state
f564cc612813 wifi: mt76: mt7996: Disable Rx hdr_trans in monitor mode
a6761a9892d9 wifi: mt76: mt7921: fix 6GHz regulatory update on connection
003216cc04b7 wifi: mt76: add missing lock protection in mt76_sta_state for sta_event callback
699a4aa3b88a wifi: mt76: mt7925: fix incorrect TLV length in CLC command
aee736a27ea2 wifi: mt76: mt7996: Fix possible oob access in mt7996_mac_write_txwi_80211()
f29ff603012e wifi: mt76: mt7925: Fix possible oob access in mt7925_mac_write_txwi_80211()
ee84094d71ba wifi: mt76: Fix possible oob access in mt76_connac2_mac_write_txwi_80211()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-01 18:41:24 +00:00
Felix Fietkau d9ac485146 ucode: nl80211: add missing survey info attributes and fix DFS CAC time
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-01 18:41:24 +00:00
Felix Fietkau 94a7c4a443 ucode: update to Git HEAD (2026-02-27)
d768823fea50 vm: rework I_DYNLOAD instruction to read module name from stack
9e265b9a1e15 program: support encoding export symbols in precompiled bytecode
926f20b55e13 compiler: add support for runtime module imports
e3d7d77f0e5d lib: avoid stack operations if required code invoked exit()
7f3a0512f49d compiler: turn static imports of precompiled modules into dynamic loads
ccc25285471b nl80211.h: update to version 6.18
bb145163147a nl80211: add WiFi 7 EHT and MLD attributes
65d268546453 nl80211: add scan, BSS status and BSS use-for constants

Fixes: https://github.com/jow-/ucode/issues/336#issuecomment-3415635374
Fixes: https://github.com/jow-/ucode/pull/338#issuecomment-3442569831
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-03-01 18:41:24 +00:00
Felix Fietkau c4d875cae2 netifd: update to Git HEAD (2026-02-26)
69a5afc9713a bridge: skip present toggle in bridge_free_member() when device is active

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-02-26 12:05:35 +00:00
Felix Fietkau 55c01365de mac80211: backport eMLSR/eMLMR parsing support
Needed for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-02-24 19:40:55 +01:00
Felix Fietkau 2256cfac68 wireguard-tools: fix string indexing in endpoint host check
Use substr() instead of array index syntax to access the first
character of the endpoint host string, as ucode does not support
array-style indexing on strings.

Fixes: https://github.com/openwrt/openwrt/issues/22116
Fixes: 8f977b4a40 ("wireguard-tools: fix handling of multi-value config options")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-02-20 19:10:13 +01:00
Felix Fietkau 75975b8c5c uclient: update to Git HEAD (2026-02-20)
7a0aa2e4afb4 uclient-http: fix data_eof for body-less responses

Fixes: https://github.com/openwrt/openwrt/issues/22103
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-02-20 09:07:59 +00:00