Commit Graph

4746 Commits

Author SHA1 Message Date
Rany Hany
a7790ce410 wifi-scripts: bump reassociation_deadline default to 20000
Most users on forums face a broken 802.11r setup when having
a very simple 802.11r config (i.e., just ieee80211r enabled).

In most cases, simply bumping reassociation_deadline to
20000 fixes their problems and allows 802.11r to just work.

Reassociation Deadline is already set to 20 seconds on Cisco
equipment by default[1] which is why this value has been
chosen.

It is also mentioned on the OpenWRT Wiki as a value that should
be changed in order for 802.11r to work on Apple devices. I think
it would be better to change the defaults instead so users don't
have to do much work for a working setup.

[1]: https://www.cisco.com/c/en/us/td/docs/wireless/controller/technotes/80211r-ft/b-80211r-dg.html

Fixes: https://github.com/openwrt/openwrt/issues/7907
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20799
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-19 18:54:27 +01:00
Rany Hany
b947064db4 wifi-scripts: allow rssi_reject_assoc_timeout to be configured
This is useful to alter the default ban time after an STA
association is rejected for being below RSSI threshold.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20811
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-19 13:57:30 +01:00
Hauke Mehrtens
18cad16f5b wireless-tools: Forward LDFLAGS
Forward the TARGET_LDFLAGS to the linking process.

Link: https://github.com/openwrt/openwrt/pull/20813
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:13:46 +01:00
Hauke Mehrtens
2fc6a143a7 resolveip: Forward LDFLAGS
Forward the TARGET_LDFLAGS to the linking process.

Link: https://github.com/openwrt/openwrt/pull/20813
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:13:45 +01:00
Hauke Mehrtens
f95fd36a2e comgt: Forward LDFLAGS
Forward the TARGET_LDFLAGS to the linking process.

Link: https://github.com/openwrt/openwrt/pull/20813
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:13:45 +01:00
Hauke Mehrtens
f5fade5fbf ead: Forward LDFLAGS
Forward the TARGET_LDFLAGS to the linking process.

Link: https://github.com/openwrt/openwrt/pull/20813
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-18 23:13:45 +01:00
Álvaro Fernández Rojas
acdf8a6291 odhcpd: update to Git HEAD (2025-11-14)
d3dc577d7e84 dhcpv6-ia: add missing limits header
be7ca7c0792b config: fix memleak during odhcpd reload
366bd81804a6 dhcpv4: update ubus DHCPv4 events/methods
942df078b670 odhcpd: rename dhcpv6_lease->clid[_data|_len]
f872ae543e6d odhcpd: rename [lease_cfg|dhcpv4_lease]->ipaddr to ipv4
aa6870be6be4 dhcpv4: use an AVL to store leases
f2d3f907e9e0 github: ci: add powerpc arch
62b94b9abac3 github: ci: add cmake build and source directories
e523232ba223 github: ci: disable json-c tests
764fda0d05a8 scripts: devel-build: disable json-c tests
f13d2cecaebf netlink: fix typo in debug msg
fa6e63bb8200 src: fix whitespace issues
2c6a9d6e12d4 vscode: enable indentation detection
b6ade2ebc514 odhcpd: add support for "ignore"
77f9a0dad517 statefiles: support per-interface hosts files
9ba4e3e0f5c5 statefiles: don't make hostsfile dependent on statefile
be9c9f895ab4 statefiles: don't write expired leases
f6f2ef2de045 statefiles: simplify statefiles_write_state6()
940ecbb39161 statefiles: write straight to file in statefiles_write_state4()
ebe0b83db6a9 statefiles: correct some comments/variable names
67a6626dd2f5 statefiles: unify host4 writing
bf9889dfcd47 statefiles: unify host6 writing
593b6b72927c statefiles: group functions
8b2a62250485 statefiles: add function to write IPv4 hosts
06904ee1d4fb statefiles: simplify state/host file writing
bb39f088f3ef statefiles: move dhcpv6_ia_enum_addrs() to odhcpd.c
cc614a451f9b statefiles: add dhcpv6_lease to dhcpv6_log_ia_addr() args
8500654e39d5 statefiles: create helper functions to write leases
98276afcff82 statefiles: introduce statefiles_write()
310846535d06 statefiles: use dirfd in dhcpv6_ia_write_statefile()
50c35c3195f2 statefiles: bail early in dhcpv6_ia_write_statefile()
134ec453dd58 statefiles: simplify dhcpv6_ia_write_hostsfile()
7136fbe390a5 dhcpv6-ia: split statefile handling to separate file
2b26df1293c1 src: replace #pragma once with defines
43baf47948c6 src: remove whitespaces at EOL
df1824aec66c vscode: add tab settings
a89b57fa1786 odhcpd: Implement RFC9762 DHCPv6 PD Preferred flag for PIOs
e63ec4001f83 dhcpv4: add support for RFC4361-style clientid
29357349b33a odhcpd: remove the "legacy" option
f6ba8004d699 odhcpd: document the "upstream" option
56c06a162a4f odhcpd: document the "ra_advrouter" option
e3aaf3312cd5 odhcpd: remove the "ra_management" option
5238defd2c1d odhcpd: remove the "pd_manager" and "pd_cer" options
4f20351c3713 odhcpd: remove the "filter_class" option
869e2231bbc9 config: drop iface_attr_info
af446679d112 README.md: add missing options
7d1b081dcb1b dhcpv4: lazy store statefiles

d44af6dd8f...d3dc577d7e

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20789
2025-11-17 08:14:26 +01:00
Matthias Van Parys
59ecc11ccf hostapd: pass global linker options to CLI tools
The CLI tools hostapd_cli and wpa_cli are compiled with
`TARGET_LDFLAGS_C` rather than the standard `TARGET_LDFLAGS`.
This variable is empty, leading to global linker options not being
applied.

Set this variable equal to `TARGET_LDFLAGS` right after the package.mk
include to make sure global linker options are applied, but local options
such as linking to crypto libraries are not.

Signed-off-by: Matthias Van Parys <matthias.vanparys@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/20345
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-16 21:44:49 +01:00
Zhi-Jun You
7ea377ed71 wifi-scripts: ucode: fix init value of config.ht_capab under 20MHz
Currently the path for setting 20MHz doesn't set ht_capab to '' at the
beginning which results in null in ht_capab in hostapd.conf.

Fix this by setting config.ht_capab to '' for 20MHz htmode.

Fixes: #20762

Signed-off-by: Zhi-Jun You <hujy652@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/20768
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-15 19:45:37 +01:00
Álvaro Fernández Rojas
4b1c2fb270 odhcp6c: update to Git HEAD (2025-11-14)
cbc8ff0e6226 github: ci: add powerpc arch
8eba02233133 github: ci: add cmake build and source directories
5f3104ea17ae github: ci: disable json-c tests
27ff42cd40f9 scripts: devel-build: disable json-c tests
e0a9d02b52d1 dhcpv6: DHCPV6_OPT_INFO_REFRESH contains a 4 byte option
5a02da9c1200 dhcpv6: use compile time resolved sizeof(struct in6_addr) for IPv6 values
cf203ceb3fc8 dhcpv6: set a static define for DUID max length
3627e85d1540 dhcpv6: set static defines for DHCPv6 option header size
ecb9a0243e77 odhcp6c: RFC comments
c284c587d37d all: spell fixes
1259a32d7e4d dhcpv6: dhcpv6_handle_reply switch case handling
227280a37853 dhcpv6: dhcpv6_handle_advert; migrate if blocks to switch case
b253f8907e72 dhcpv6: migrate to switch case for dhcpv6_handle_reply
61a54db802cb dhcpv6: migrate to switch case for dhcpv6_handle_reply
49c64bbe00ba all: drop CER_ID
16ce83075b2e dhcpv6: refactor u8 and u16 to u32 to avoid boolean coercion

e5690c1f13...cbc8ff0e62

Options related to homenet (EXT_CER_ID) have been removed, so drop them from
the package.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20791
2025-11-15 16:41:29 +01:00
Rany Hany
6df060ba4a wifi-scripts: ucode: create wpa_psk_file and sae_password_file when needed
This handles the case when 'wpad' or 'wpad-mini' package is used which is
missing WPA3 support. This makes it impossible to use ucode wifi-scripts
on such APs as it will raise an error:

   daemon.err hostapd: Line 87: unknown configuration item 'sae_password_file'

This also achieves parity with what is currently happening with old wifi-scripts.
The behavior now matches.

Fixes: https://github.com/openwrt/openwrt/issues/20781
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20784
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-15 11:13:36 +01:00
Felix Fietkau
92445cc982 wifi-scripts: respect rsn_override=0 in mixed modes
Only set rsn_override_key_mgmt when rsn_override is enabled.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 12:41:42 +00:00
Felix Fietkau
ff44aa490a wifi-scripts: only enable RSN override when parameters differ
When encryption is set to 'sae' without explicit pairwise cipher in
non-HE/EHT mode, both the main RSNE and override RSNE would advertise
identical parameters (SAE+CCMP+MFP=2), adding unnecessary overhead.

Check that the pairwise ciphers differ before enabling override. This
preserves the intended behavior for HE/EHT modes (GCMP-256+CCMP vs CCMP)
while avoiding pointless override IEs.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 12:26:59 +00:00
Felix Fietkau
e81936f5bc hostapd: fix phy parameter in iface_update_supplicant_macaddr
The function was using phydev.name (e.g., "phy0.0") instead of
phydev.phy (e.g., "phy0") when calling wpa_supplicant.phy_set_macaddr_list.
This is inconsistent with all other wpa_supplicant ubus calls in the same
file which correctly use phydev.phy.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 12:02:55 +00:00
Felix Fietkau
75791ea634 wifi-scripts: fix MLO AP setup with disabled radios
When an MLO interface specifies multiple radios and the first radio
is disabled, the MLO configuration was never created because the code
only attempted to create it when processing the first device in the
list (which gets skipped if disabled).

Fix by creating the MLO config for the first enabled device instead
of only when processing dev_names[0].

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 11:56:39 +00:00
Felix Fietkau
2fb3cbda58 wpa_supplicant: fix MAC address assignment for MLD interfaces
Assign the address at wdev create time, similar to legacy interfaces.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 11:56:39 +00:00
Felix Fietkau
d619ff6872 wifi-scripts: fix wds client mode with MLO
Ensure that the 4addr flag is passed to phy.wdev_add.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-13 11:56:39 +00:00
Andy Chiang
00e881451a wifi-scripts: ucode: fix start failed
When using wpad-openssl/wpad-basic-openssl, wpa_supplicant/hostapd may not be ready because of openssl.
This cause supplicant.setup and hostapd.setup to be failed.
Therefore, wait for wpa_supplicant/hostapd to be ready before supplicant.setup and hostapd.setup.

Run-tested: mediatek/filogic GL-MT3000
fixes: #20361

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-12 13:45:50 +01:00
Paweł Owoc
cc3e211264 wifi-scripts: use stationary_ap conf for AX mode
Use stationary_ap configuration for 6GHz AX AP (not only BE).
This change fixes the 6GHz network not visible issue for QCN9024.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2025-11-12 12:14:53 +01:00
Hauke Mehrtens
0c6fa6edce
odhcp6c: update to Git HEAD (2025-11-09)
17ef5f40d48a readme: rewrite in markdown
0fcfe9166173 readme: document all environment options
e3949977ca94 readme: update for prpl patch-set additions
86544fa2b581 src: align SoftAtHome license headers format
8bad7df9feb9 src: reorder includes alphabetically
6d353ff96826 src: remove pragma once in headers
f5684d570200 treewide: remove whitespaces at EOL
e5cfea8f6ef8 src: add missing if/else braces
a92f199d6b8d dhcpv6: potential bug fix for checking DHCPV6_OPT_STATUS
9e414d41e16e readme: fix description string
775e6c759cfd dhcpv6: return early upon success
e5690c1f13ed treewide: Replace _unused with _o_unused

This fixes the build on powerpc.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/20712
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-10 23:52:06 +01:00
Andy Chiang
4ad22d0342 firewall: config: add dest addr restrictions for DHCPv6 rules
Some ISPs may use a GUA or other non-LLA as the source addr for the DHCPv6 response, but the destination addr is always LLA (fe80::/10).
Therefore, adding a dest addr restriction improves security.
See https://forum.mikrotik.com/t/xfinity-comcast-dhcpv6-configuration-change/156031/10

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/20562
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 15:23:16 +01:00
Rany Hany
df338d67d4 wifi-scripts: allow sae_password_file to be configured
Adds missing config_add_string for sae_password_file.

Fixes: 65a1c666f2 ("hostapd: add SAE support for wifi-station and optimize PSK file creation")
Fixes: https://github.com/openwrt/openwrt/issues/19717
Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/19964
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 15:21:45 +01:00
David Härdeman
a88a19982d odhcpd: update Makefile description
Make it a little bit more consistant, and a bit more idiomatic.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-10 12:58:15 +01:00
David Härdeman
002e22b069 odhcpd: update Makefile, remove homenet
The support has been removed from odhcpd, so remove the Makefile options
related to homenet.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-10 12:53:25 +01:00
David Härdeman
781b04a84f odhcpd: reload on change to service/network cfg
"system" is used to get the current time zone, "network" is used to get
the global DUID.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-10 12:53:11 +01:00
David Härdeman
9be4970581 odhcpd: remove legacy option
Support for this option has been removed from odhcpd, so remove it in
the defaults as well.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-10 12:52:39 +01:00
Eneas U de Queiroz
0b9111301b wifi-scripts: ucode: iwinfo: expand AKM display
This exands the list of AKMs to display:
 - display the hash when larger than the default (loosely based on
   what hostapd uses in config).
   - renaming 'WPA PSK2' to 'WPA PSK-SHA256' as a result
 - separate FILS suites from plain 802.1x
 - add suites 3, 5, 9, 19, 20, 24, and 25

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20686
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 11:46:55 +01:00
Eneas U de Queiroz
988b2ed515 wifi-scripts: ucode: iwinfo: escape control chars
Escape control characters when displaying ESSID.  It is not uncommon for
a scan to encounter invalid SSIDs, containing binary data.  Escape the
control characters to avoid messing the display (ENQ is particularly
bothersome).

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20686
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 11:46:55 +01:00
Eneas U de Queiroz
e50703d033 wifi-scripts: ucode: iwinfo: show ESSID in scan
This adds the ESSID: line to the iwinfo scan results.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20686
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-10 11:46:55 +01:00
Andy Chiang
7079e456ad ppp: add reqprefix norelease ac_mac
Use ppp and enable autoipv6, odhcp6c supports reqprefix and norelease to minimize the chance of IPv6 PD changes.[1]
PPPoE supports connecting to a specific AC/BRAS by using the pppoe-mac parameter.[2]

1. https://github.com/openwrt/openwrt/blob/master/package/network/ipv6/odhcp6c/files/dhcpv6.sh#L67
   https://github.com/openwrt/openwrt/blob/master/package/network/ipv6/odhcp6c/files/dhcpv6.sh#L77
2. https://github.com/ppp-project/ppp/blob/master/pppd/plugins/pppoe/plugin.c#L93

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19978
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-09 16:17:01 +01:00
Hauke Mehrtens
6d04c7b6dc iproute2: Update to version 6.17
https://www.spinics.net/lists/netdev/msg1094722.html
https://www.spinics.net/lists/netdev/msg1112693.html
https://www.spinics.net/lists/netdev/msg1126307.html

Only small size increases:
```
 42470 bin/packages/mipsel_24kc/base/devlink-6.17.0-r1.apk
  7553 bin/packages/mipsel_24kc/base/genl-6.17.0-r1.apk
 35340 bin/packages/mipsel_24kc/base/ip-bridge-6.17.0-r1.apk
195151 bin/packages/mipsel_24kc/base/ip-full-6.17.0-r1.apk
133690 bin/packages/mipsel_24kc/base/ip-tiny-6.17.0-r1.apk
 12185 bin/packages/mipsel_24kc/base/nstat-6.17.0-r1.apk
 21484 bin/packages/mipsel_24kc/base/rdma-6.17.0-r1.apk
 40935 bin/packages/mipsel_24kc/base/ss-6.17.0-r1.apk
168132 bin/packages/mipsel_24kc/base/tc-bpf-6.17.0-r1.apk
169667 bin/packages/mipsel_24kc/base/tc-full-6.17.0-r1.apk
144693 bin/packages/mipsel_24kc/base/tc-tiny-6.17.0-r1.apk

 41654 bin/packages/mipsel_24kc/base/devlink-6.14.0-r1.apk
  7551 bin/packages/mipsel_24kc/base/genl-6.14.0-r1.apk
 32847 bin/packages/mipsel_24kc/base/ip-bridge-6.14.0-r1.apk
194398 bin/packages/mipsel_24kc/base/ip-full-6.14.0-r1.apk
132656 bin/packages/mipsel_24kc/base/ip-tiny-6.14.0-r1.apk
 12114 bin/packages/mipsel_24kc/base/nstat-6.14.0-r1.apk
 21366 bin/packages/mipsel_24kc/base/rdma-6.14.0-r1.apk
 40939 bin/packages/mipsel_24kc/base/ss-6.14.0-r1.apk
163878 bin/packages/mipsel_24kc/base/tc-bpf-6.14.0-r1.apk
165511 bin/packages/mipsel_24kc/base/tc-full-6.14.0-r1.apk
140497 bin/packages/mipsel_24kc/base/tc-tiny-6.14.0-r1.apk
```

Link: https://github.com/openwrt/openwrt/pull/20545
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-08 21:17:50 +01:00
Rany Hany
4c5df354df wifi-scripts: ucode: add SAE support for wifi-station and PPSK
This implements 65a1c666f2 ("hostapd: add SAE support for wifi-station
and optimize PSK file creation") and 913368a2 ("hostapd: add support for
SAE in PPSK option") for the ucode version as well.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/19965
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-08 12:09:31 +01:00
Aleksander Jan Bajkowski
c996ae7602 libiwinfo: update to Git HEAD (2025-11-07)
40563018dc87 iwinfo: print HT operation only if present
5f4c213fc59f iwinfo: export HE and EHT operation in scan results

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/20690
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-11-08 00:19:34 +01:00
Rany Hany
372fc5419c wifi-scripts: ucode: fix setting tx_queue_data2_burst in config
Currently we unconditionally set it to 2.0 if 802.11ac and disregard
what the user set. This sets it to 2.0 only as a default in case
user didn't specify a tx_burst setting.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20565
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 21:18:15 +01:00
Rany Hany
8e457b69a2 wifi-scripts: add sae_track_password option
This is useful if multiple passwords were specified without
the use of a SAE password identifier. This is the only
way to get multiple passwords for a single peer to work
without resorting to password identifiers.

Unfortunately, support for password identifiers is non-existent
on Android and macOS; and possibly others. So this is the only
option in that case.

As an alternative, one could also continue to use WPA2-PSK instead
as that could easily resort to a bruteforce approach without any
complications.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20597
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 21:17:04 +01:00
Rany Hany
bcdb29f78f wifi-scripts: add na_mcast_to_ucast option
As this is generally only useful with "proxy_arp" enabled,
we default na_mcast_to_ucast to true if "proxy_arp" is already
enabled.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/20596
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 21:15:09 +01:00
Eneas U de Queiroz
ed3f84e091
wifi-scripts: ucode: fix hostapd_bss_options
The raw option inside 'config wifi-iface' is called hostapd_bss_options,
not hostapd_options.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20657
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-07 19:41:01 +01:00
Marko Zajc
38753dea64 dnsmasq: prevent upstream resolution of addresses
`list address` entries in /etc/config/dhcp are sometimes (I'm not sure
about the exact conditions) passed to upstream resolver, bypassing local
resolution. Adding them (minus the IP) to --local prevents this. In the
configuration, this means that

    # /etc/config/dhcp
    list address '/hello.com/world.com/1.2.3.4'
    list address '/foo.com/bar.com/4.3.2.1'

which previously translated into

    # /var/etc/dnsmasq.conf.*
    address=/hello.com/world.com/1.2.3.4
    address=/foo.com/bar.com/4.3.2.1

now becomes

    # /var/etc/dnsmasq.conf.*
    address=/hello.com/world.com/1.2.3.4
    local=/hello.com/world.com/
    address=/foo.com/bar.com/4.3.2.1
    local=/foo.com/bar.com/

This behaviour is controlled by the `address_as_local` boolean option, which
defaults to false (old behaviour). openwrt/luci#7957 adds support for this flag
to LuCI.

A workaround for a small list of domains is to add them to `option local`,
but this is very tedious to do for every `list address` entry and dnsmasq
limits this option to 1024 characters.

Signed-off-by: Marko Zajc <marko@zajc.tel>
Link: https://github.com/openwrt/openwrt/pull/18610
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-07 15:23:25 +01:00
Felix Fietkau
6bb30afe2f wpa_supplicant: pass control events on the per-interface ubus object
Events are passed in the same format as they would be sent on the control
socket.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-11-06 11:23:03 +00:00
Hannu Nyman
9bd2c55a33
treewide: edit local CMakeLists.txt to be compatible with cmake 4.x
Edit CMakeLists.txt to fulfill cmake 4.0 requirement that
cmake_minimum_required is now at least 3.5 and in future 3.10.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/20265
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-04 15:14:53 +01:00
Álvaro Fernández Rojas
dbbfe52568 odhcpd: update to Git HEAD (2025-11-04)
d44af6dd8f4e dhcpv6: create struct dhcpv6_lease
4df45c8c3722 dhcpv4: create struct dhcpv4_lease
a6dccae41b60 odhcpd: struct lease -> struct lease_cfg
fc0abb66f122 dhcpv4: use leasetime from a->lease
74eeff193848 router: always use link-local src address for RAs
b9a071b8341f router: Rewrite the ingress MTU to one configured for the interface
1ef9e0e610d5 router: utilize interface ra_mtu for RA
1480c09ee0aa config: clamp ra_mtu to interface MTU, and default ra_mtu to interface MTU
ee4f0df6bd68 netlink: Store interface MTU at link change
d174e25e85a1 github: fix CI apt dependencies
8f393d55a76e odhcpd: more fixes for IID calculations

fc27940fe9...d44af6dd8f

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-04 12:38:03 +01:00
Álvaro Fernández Rojas
7702ff293f odhcp6c: update to Git HEAD (2025-11-04)
b3e1db42b4db odhcp6c: fix safe interval processing to follow RFC 4862
63461f64d4c1 dhcpv6: always include IA_NA and IA_PD in Request message if requested
1051cabb4da3 dhcpv6: fix incorrect IA type being printed in syslog
c5237eabeb5c odhcp6c: prevent RELEASE at shutdown when -k is set
a01b1ff1e50f odhcp6c: fix client exiting if Renew and Rebind fails
4839bf6d0feb odhcp6c: implement RKAP: Reconfiguration Key Authentication Protocol
52a9a847def4 dhcpv6: fix solicit loop when server has no address available
7b1f67c23de6 ubus: implement ubus methods to force a Renew and Release
2b0e8f2d8541 ubus: implement retransmission configuration via ubus
8d89d373f360 odhcp6c: add failure when -E option is used without ubus support enabled
58f3c9eb1163 odhcp6c: add new argument option to disable script call
1048fc4fb622 reconfigure: move all configuration functions to a new file
93f056d3a1f2 reconfigure: implement DHCP reconfiguration
af669fb23cd3 dhcpv6: implement statistics for DHCPv6
3a1a599fecb7 ubus: implement UBus method to get state data immediately
44c50214997d ubus: emit UBus event on DHCP state changes
33b972bc526a ubus: connect to UBus backend
2f609f248faf odhcp6c: implement asynchronous handling for DHCPv6 State
6466314e7f62 odhcp6c: enable Non-Blocking DHCPv6 Socket
1df65f0caf46 dhcpv6: refactor dhcp_request Function
047c63a8156b dhcpv6: add t1 and t2 transmission
1b5f0c402bbf dscp: add option to set dscp value
96017df54d8f dhcpv6: fix wrong retransmission of DHCPv6 Solicit
b929fc8a1cfd odhcp6c: add a simple build script
adc651ffed55 cmake: make libubox mandatory
5182e2b696ef cmake: drop EXT_PREFIX_CLASS
8d052c52e18d cmake: disable pedantic
f2521b296b21 github: fix CI apt dependencies

77e1ae21e6...b3e1db42b4

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-11-04 10:26:23 +01:00
Florian Eckert
32c46b569f odhcp6c: add new option to start 4in6 protos as dynamic interface
If proto 'dhcpv6' is set for an interface, dynamic interfaces are created
for the protocols map, dslite or 464xlat if this netifd protocols are
installed and the interface option is not explicitly set to '0'.

The problem is that this option cannot be configured via LuCI, which means
that the dynamic protocols are started. In my case, that is the '464xlat'
'6in4' protocol. I see the follwing log messages continuously in the log as
I do not have a '464xlat' in my network.

Fri Aug 22 10:36:33 2025 daemon.notice netifd: Interface 'wan6_4' is now down
Fri Aug 22 10:36:33 2025 daemon.notice netifd: Interface 'wan6_4' is setting up now
Fri Aug 22 10:36:36 2025 daemon.notice netifd: Interface 'wan6_4' is now down
Fri Aug 22 10:36:36 2025 daemon.notice netifd: Interface 'wan6_4' is setting up now

To fix this by adding a new option to disable the dynamic interface creation
for '4in6' if needed. The option is named '4in6_dynamic' and is a boolean.

If the new option is 'true' (default) dynamic interfaces are create.
If the new option set to 'false' no dynamic 4in6 interface are created.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-11-03 12:06:18 +01:00
Florian Eckert
73e21749ba odhcp6c: cleanup variable definitions
The variable definitions are very confusing. Therefore, this commit groups
them together so that the line length is not exceeded.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-11-03 12:06:18 +01:00
Florian Eckert
b0d1a6aa38 odhcp6c: use && in if statement on dynamic interfaces
It es recommended to use '&&' to improve readability on 'if' statement.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2025-11-03 12:02:58 +01:00
Mateusz Poliwczak
38a0d6b1fd odhcp6c: add mtu_dslite option for dhcpv6 proto
This allow configuring the MTU of the ds-lite tunnel.

Updates #8190

Signed-off-by: Mateusz Poliwczak <mpoliwczak34@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20606
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-11-03 11:22:13 +01:00
Felix Fietkau
e373a32a7c wpa_supplicant: use a timer to defer starting interfaces
This allows wpa_supplicant to process pending netlink socket messages
first. Without this change, there is a race condition where the newly
created interface processes netlink events from the removal of the
previous interface.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-31 21:22:35 +01:00
Felix Fietkau
3ab2f32006 wpa_supplicant: add support for issuing control socket commands via ubus
This makes it possible to have more flexible control over the supplicant
without having to install wpa_cli.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-31 21:22:35 +01:00
Felix Fietkau
0d189171e1 wpa_supplicant: move per-interface ubus object to ucode
Remove previous implementation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-10-31 21:22:35 +01:00
Christian Marangi
afb83c8197
unetmsg: drop usage of AUTORELEASE
AUTORELEASE has been deprecated from a long time. Drop it and hardcode
the release following the current one present in the downloads
repository.

Link: https://github.com/openwrt/openwrt/pull/20586
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-29 21:09:56 +01:00