Commit Graph

4459 Commits

Author SHA1 Message Date
Hauke Mehrtens
9287454eee uhttpd: cherry pick patches from main
This fixes the following security isseus with CVE numbers:
CVE-2026-55614: GHSA-mcfg-c4r7-pjpf — case-sensitive Transfer-Encoding matching
CVE-2026-55612: GHSA-p55c-rmhc-qfm5 — invalid chunk-length state reset
CVE-2026-55613: GHSA-wgwp-64hh-f52p — ubus POST body parse-error desync

The branch also carries hardening with no CVE: one-byte overflow in
uh_urldecode, off-by-one OOB read in uh_b64decode, constant-time
password compare, $p$ crypt-hash handling.

Link: https://github.com/openwrt/openwrt/pull/24259
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f68fa732873c280f290f16aef32b3240c790b390)
2026-08-18 11:40:42 +01:00
Hauke Mehrtens
328e3c3f35 hostapd: fix security advisory 2026-1
Cherry pick the patches recommended in the hostapd security advisory
2026-1:
https://w1.fi/security/2026-1/missing-ml-parsing-validation.txt

Vulnerability

Vulnerabilities in parsing and use of received multi-link (MLO/EHT/IEEE
802.11be/Wi-Fi 7) information has been identified in hostapd and
wpa_supplicant. These issues show up in various cases where frames
including information on affiliated links are parsed and processed in
both AP and STA modes. The issues can result in process termination due
to buffer read overflow checks and memory corruption.

The issues for AP mode (hostapd or wpa_supplicant) can result in
denial-of-service attacks due to process termination and small memory
corruption that could theoretically cause other issues, but it does not
seem likely that those could be exploiting in practice. Affected areas
can be reached by sending invalid Management frames without needing
authentication or user action on the target device.

Link: https://github.com/openwrt/openwrt/pull/24043
(cherry picked from commit 8614a2ba6885d0bec345a1010a0d59c64abe403c)
[Removed 004, 0005 and 008 which do not apply and fix some others]
Link: https://github.com/openwrt/openwrt/pull/24295
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 452bc24984b7df0ab12e73372d3fbb3930d404fe)
2026-08-18 11:40:42 +01:00
Hauke Mehrtens
a7a423902c umdns: update to Git HEAD (2026-06-16)
1b5e7bf1cec7 cache: bound cache size and clamp hostile TTLs

Link: https://github.com/openwrt/mdnsd/security/advisories/GHSA-jg8f-fhfw-jg46
(cherry picked from commit 5b2c8f4ff94ef7c339586c8a59a684009f1b7194)
Link: https://github.com/openwrt/openwrt/pull/24297
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 924f06e76cd73e24d39691a4de621bdcae80a756)
2026-08-18 11:40:42 +01:00
Felix Fietkau
277526ab71 umdns: update to Git HEAD (2026-05-22)
bd7599d02157 fix calloc_a size argument type

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 74da669505b0dc3c1c1231e89a52589b71cbb29f)
Link: https://github.com/openwrt/openwrt/pull/24297
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 81bc4a3cc514a42869a0153b52a9902be8fc98f8)
2026-08-18 11:40:42 +01:00
Hauke Mehrtens
f1470a1600 ead: Increase PKG_RELEASE
Indicate that there are some changes. This should make sure that the
package gets updated.

Fixes: 63c0767f3d02 ("ead: fix integer underflow in handle_send_a()")
(cherry picked from commit 75fad162df8e88d0b535cca83453b0ad05267349)
Link: https://github.com/openwrt/openwrt/pull/24298
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 58264cce83b0837fabf94021b5677dd3209b2655)
2026-08-18 11:40:42 +01:00
Hauke Mehrtens
3a550aa906 ead: fix integer underflow in handle_send_a()
handle_send_a() computed the SRP "A" parameter length as

    len = ntohl(msg->len) - sizeof(struct ead_msg_number);

sizeof(struct ead_msg_number) is 1, and the subtraction is evaluated in
unsigned arithmetic. A packet with msg->len == 0 therefore wraps the
result to a huge value which, assigned to the signed int len, becomes -1.
The following bounds check is signed:

    if (len > MAXPARAMLEN + 1)
        return false;

so -1 passes, and memcpy(A.data, number->data, len) runs with len cast to
size_t (~SIZE_MAX) against the 257-byte abuf, crashing the daemon.

Neither parse_message() nor handle_packet() validate msg->len (only the
captured packet length), so an unauthenticated attacker on the local
segment can reach this path and crash ead with a single crafted packet.

Validate the claimed length in unsigned arithmetic before the subtraction
and bound it on both sides. Doing the upper-bound check unsigned as well
also closes a 32-bit-only variant where sizeof(ead_packet) + msg->len
overflows in handle_packet(), letting a large msg->len reach the same
negative-len path.

Link: https://github.com/openwrt/openwrt/security/advisories/GHSA-9558-77jp-g3fw
Reported-by: @Vasco0x4
Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit 63c0767f3d02f7b10b0f0b5293366bd059a08ca5)
Link: https://github.com/openwrt/openwrt/pull/24298
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3944c026aa7cd27222ce334df72d2bcb6be86b9c)
2026-08-18 11:40:42 +01:00
John Audia
d8de4343df backport: update dnsmasq to v2.93 from master
Wholesale drop of dnsmasq from master/not a cherry pick.

Reference PR: https://github.com/openwrt/openwrt/pull/23669

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23804
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit cd8d701c7fc0efe9b8170b44354945a21474c066)
2026-08-18 11:40:41 +01:00
Hannu Nyman
e3a77299f7 dnsmasq: apply six CVE-fix upstream patches to 2.90
Apply upstream patches for the recently published CVEs in dnsmasq.

Source: https://thekelleys.org.uk/dnsmasq/CVE/
Reference: https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2026q2/018471.html

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/23328
(cherry picked from commit dc04999b1ff41d6bac64c484e62502f933c32852)
[added this to main branch first, 002-CVE-2026-4890.dnsmasq-2.91.patch modified]
Link: https://github.com/openwrt/openwrt/pull/23365
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 15250e11aa4e77e47cee3afca0625fca02c97917)
2026-08-18 11:40:41 +01:00
Harin Lee
67c8a3315d wifi-scripts: fix macaddr check in mac80211.uc
This fixes a simple logic error in the macaddr existence check in mac80211.uc.

Signed-off-by: Harin Lee <me@harin.net>
Link: https://github.com/openwrt/openwrt/pull/21277
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2ebcda1ea6b757864c4700e543a9767752ca766e)
Link: https://github.com/openwrt/openwrt/pull/23100
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit b76c38f9e2316e3ad125f6f2e4c7e27d025fad6e)
2026-08-18 11:40:40 +01:00
Jonas Gorski
7d7295bf65 umdns: update to Git HEAD (2026-02-06)
a52cdb354d13 dns: validate IPv4 record addresses
b798c24205b5 dns: validate IPv6 record addresses
a3dcb4adc635 dns: validate reverse dns query name lengths

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(cherry picked from commit 8a7eb57ab8366045d7e1470c003827391e37684b)
(cherry picked from commit 68befe26ac033d7817014ff014e8eedc4c701360)
2026-08-18 11:40:39 +01:00
Hauke Mehrtens
1b3bfa60ba dropbear: backport security fixes
This fixes the following security problems:
CVE-2025-14282: Avoid privilege escalation via unix stream forwarding in Dropbear server.
CVE-2019-6111: This allowed a malicious server to overwrite arbitrary local files.

This backports two upstream merged PRs:
https://github.com/mkj/dropbear/pull/391
https://github.com/mkj/dropbear/pull/394
and this upstream commit:
48a17cff6a

Link: https://github.com/openwrt/openwrt/pull/21192
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 0f52a05723988633882d6c52122009ce11f8956b)
2026-07-09 10:57:35 +01:00
Petr Štetiar
0d78bcf9a7 dropbear: enable configurable port forwarding options
Currently its only possible to disable port forwarding only for specific
keys, via the OpenSSH-style restriction in `authorized_keys` file.

In some use cases it might be feasible to disable such features globally
on service level, so lets add new LocalPortForward and RemotePortForward
config knobs.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/21071
(cherry picked from commit 83f6177dbf44fa92ecf6d2e1cda9f92cfc5fe849)
[ fix conflict error ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 3c97c4a44cbeb767281f3260c1f6da4772432807)
2026-07-09 10:57:35 +01:00
Andy Chiang
92c3e97372 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>
(cherry picked from commit 7079e456ade5aad41e265c55cee49e4692807ecf)
Link: https://github.com/openwrt/openwrt/pull/20824
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 13226471ef02e622cb42ab36d0fb1322c3b93449)
2026-07-09 10:57:34 +01:00
Álvaro Fernández Rojas
8ec7957d47 odhcpd: backport memleak fix from Git HEAD
be7ca7c0792b config: fix memleak during odhcpd reload

https://github.com/openwrt/odhcpd/commit/be7ca7c0792b

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 4d1c1d775468c1dc60a8e6e0dd6e1364176c03ae)
2026-07-09 10:57:33 +01:00
Álvaro Fernández Rojas
6b33cd409b odhcpd: backport fixes from Git HEAD (2025-10-10)
A lot of recent commits in odhcpd main branch are structural/semantic
changes, so instead of adding those changes to 24.10 branch it's better
to focus on the fixes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 180646ce4b012c721e3cb33f9dca92e5234a739b)
2026-07-09 10:57:29 +01:00
Álvaro Fernández Rojas
ed4a6c63c5 odhcpd: update to Git HEAD (2025-10-02)
b14cf98 router: log “Sending a RA on lan” at LOG_DEBUG
c2810fe odhcpd: update cmake file
8c2c065 odhcpd: convert README to markdown
3b96480 odhcpd: allow the use of an alternative cfg file
7328bfe odhcpd: remove confusing #defines
cdb9e5b odhcpd: improve RFC9096 § 3.5 SLAAC compliance

RFC9096 § 3.5 SLAAC compliance introduces a new config option (odhcpd
piofolder), which may wear out the flash under certain conditions (for
example: ISPs with dynamic IPv6 prefixes which disconnect the clients
every X hours).
Therefore, setting "dhcp.odhcpd.piofolder" to persistent storage in the
router flash is not advisable and should be set to other kinds of
persistent storage such as USBs, SDs, NVMEs...
In order to prevent wearing out the router flash it's set to ephemeral
storage by default (tmp):
  uci set dhcp.odhcpd.piofolder="/tmp/odhcpd-piofolder"

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit ea79b5875af8ead522050d16850264b01166e8a8)
(cherry picked from commit be32ab85cff01370da77ec88925edefa97ced1a7)
2026-07-09 10:57:29 +01:00
Ted Hess
a1f46fa283 odhcpd: update to Git HEAD (2025-09-27)
bc9f9d93d4d6 dhcpv4: allow lease takeover (bugfix)
b1547922257e odhcpd: bump minimum cmake version
86c0200f8067 odhcpd: apply RFC9096 recommended lifetimes

Signed-off-by: Ted Hess <thess@kitschensync.net>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 9b7d0c0d168edd5156a06b21e59b8379c270bdc9)
(cherry picked from commit 82d31a02b7cf9eb66d246ee4b620efe7fcf2e40e)
2026-07-09 10:57:29 +01:00
Ted Hess
e08d62c819 odhcpd: update to Git HEAD (2025-09-16)
c9816de148cc odhcpd: support multiple per-client MAC addresses

Signed-off-by: Ted Hess <thess@kitschensync.net>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 9939ebc7fc0ca3a31eddeba5715884cb307fdcad)
(cherry picked from commit 81dfcefb41bef2888f7cbe1725da678c44b51b6a)
2026-07-09 10:57:29 +01:00
David Härdeman
96d22e1284 odhcpd: update to Git HEAD (2025-08-26)
2859741d971e dhcpv4: store reqopts as uint8_t
6d342cc03bf7 odhcpd: add DNR (RFC 9463) support
c89b8b3f2ff3 odhcpd: make the IPv6 RA DNR lifetime configurable
066b3dc6ec1a netlink: fix a memory leak
171140e90b6a odhcpd: add a helper function for addr6/prefix parsing
5585b969c18f router: move pref64 calculations to the config stage
4308384748be dhcpv6: add ipv6 pxe support
6e1ad492cef5 router: replace ssize_t with size_t

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20022
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit a6da0e0d376bac4c75a3b1401bd52d49e608b891)
(cherry picked from commit 39510c21a0025b75240f32e37fa5f4fceb6570a3)
2026-07-09 10:57:29 +01:00
Hauke Mehrtens
df46dd2b3f uqmi: Increase PKG_RELEASE
Make sure that the package gets updated after the last fix.

Fixes: 9d83c1b1a9d4 ("uqmi: fix data-format parsing")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 0203ef3fc95bb1745418be90b30ee400b72108c2)
(cherry picked from commit de44a349084af8481aa5f67ceacf424e06b0a166)
2026-07-09 10:57:26 +01:00
David Bauer
baa24f3b0b uqmi: fix data-format parsing
wda-get-data-format now returns an object instead of a single string.
Account for this change when reading the packet data format.

Suggested-by: Sebastian Ertz (https://github.com/sebastianertz)
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit cd20ae44f22d7a10d3522ad94894ca34828fa163)
(cherry picked from commit 9d83c1b1a9d4991958870b247552551661af4c3b)
2026-07-09 10:57:25 +01:00
David Bauer
6aea3400b7 uqmi: update to latest HEAD
7914da4 uqmi: extend wda-get-data-format
7aef645 wda: add option for enabling flow-control
f74ddb3 wds: implement retrieval of profile list
6be8b6e wds: implement selection of LTE attach PDNs
21c4aaa wds: implement selection of default profile
5c844c0 wds: implement profile deletion
0756755 wds: reduce code duplication
283fbe0 data: add downlink padding option
4b90804 wda: allow agggregation parameter configuration
c20c017 uqmi: enable binding WDS sessions to QMAP multiplex
a1b37fe uqmi: fix whitespace errors

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 1df3d0c4b87a05200708ff8644d3c071d1693747)
(cherry picked from commit c46cccde284ce15c4e6c0cb49da510acb748d238)
2026-07-09 10:57:24 +01:00
David Bauer
e17040f4b8 uqmi: update to latest HEAD
a933061 uqmi nas: fix incorrect parameter order

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 9099721fb46048307dca09135c16955c4bc28434)
(cherry picked from commit e32ee37fdadf6d17d33a45375c21c17f54e8eb80)
2026-07-09 10:57:24 +01:00
Felix Fietkau
dde8e31ec1 wifi-scripts: fix reload handling with random macaddr
Allow initially generated MAC address to be preserved across reload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5bdb7a59906ee71d0178f78c4b3ce4c4ff4bb4e0)
(cherry picked from commit 76eb96c875fce2f8b83f3e2a7a675aade308c5c9)
2026-07-09 10:57:24 +01:00
Christian Korber
2b12044c52 hostapd: fix logging of configuration content
This commit is an adoption of the fix for #14049 to
apply it for openwrt-24.10.

Signed-off-by: Christian Korber <ck@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/17718
Link: https://github.com/openwrt/openwrt/pull/19660
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 33728aa96c8d1206c9c31080654de2f7cf143ee5)
2026-07-09 10:57:23 +01:00
Petr Štetiar
6fc09908b2 ebtables: fix PKG_MIRROR_HASH
Current PKG_MIRROR_HASH is wrong, but it went unnoticed, because the
tarball is being fetched from @OPENWRT project mirrors. Can be
reproduced with:

 make package/ebtables/{download,check} FIXUP=1 DL_DIR=/tmp PKG_MIRROR_HASH=''

Signed-off-by: Petr Štetiar <ynezz@true.cz>
Link: https://github.com/openwrt/openwrt/pull/20322
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 7d4edb21b62a84a3a9442263b3080c3d443e12f7)
(cherry picked from commit 0d3076aa19a0f5ebdaa63abb30864cebafbb16bf)
2025-10-23 09:26:06 +00:00
Christian Marangi
455d3d0b8a Revert "netifd: allow concurrent build with wifi-scripts"
This reverts commit e26e856459.

From release 24.10 we always use wifi-scripts and netifd doesn't ship
netifd-wireless.sh anymore.

When wifi-scripts is selected, the netifd install fails as it can't find
the local script to remove.

To fix it, drop the workaround entirely.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-09 18:05:06 +00:00
Petr Štetiar
8522723fa1
wifi-scripts: make reuse possibly by removing netifd dependency
Make it possible to use wifi-scripts for initial wireless
autoconfiguration without netifd as we can't have netifd enabled in the
system, since it would clash with prplWare stack.

Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:29:59 +00:00
Christian Marangi
093ae255ef
wifi-scripts: adapt to prplOS default name and guest interface
Adapt mac80211.uc script to prpl0S default name and add guest interface
default config following prplOS mainline modification.

References: PCF-1428
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-07-31 15:29:58 +00:00
Matthias Franck
e0ae41cb83
dropbear: remove bind to interface patch
This patch was upstreamed and is now available in the currently used 20242.86 version of dropbear.
For this reason we can remove the patch from prplos.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
2025-07-31 15:28:00 +00:00
John Crispin
e26e856459
netifd: allow concurrent build with wifi-scripts
A feed might provide the new wifi-scripts package that moved the wifi
script files to a dedicated package.

Add support for this by tweaking netifd package and check if
wifi-scripts is getting compiled. In such case, remove the netifd
file in favor of feed package.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-07-31 15:27:34 +00:00
Petr Štetiar
e217af187e
hostapd: Multi-AP: wpa_supplicant: added support for VLAN ID and Multi-AP profile parsing
[ this is V1 of the patch as a interim solution before V2 is submitted
  upstream and eventually merged ]

For Multi-AP traffic separation requirement, wpa_supplicant parses
802.1Q Multi-AP sub-element and reports:

 - VLAN ID of the AP it connects to.
 - Multi-AP profile of the AP it connects to.

Closes: PCF-1538
Upstream-Status: Denied [https://patchwork.ozlabs.org/project/hostap/patch/DM4PR19MB6173508761EFFA0E7E366CD8A88E2@DM4PR19MB6173.namprd19.prod.outlook.com/#3434833]
Signed-off-by: Jurijs Soloveckis <jsoloveckis@maxlinear.com>
Signed-off-by: Igor Plesser <i.plesser@inango-systems.com>
Signed-off-by: Maarten De Decker <maarten.dedecker@mind.be>
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:25:54 +00:00
Matthias FRANCK
25a72db05e
odhcp6c: fix wrong retransmission of DHCPv6 Solicit
When the DHCPv6 client sends a DHCPv6 Solicit with both IA_NA and IA_PD
options, and if the server replies with a status code = NoAddrsAvailable
in the IA_NA option, then currently the DHCPv6 client sends a new
Solicit with only the IA_PD option despite the fact that a prefix was
sent by the server in the previous Advertise.

This behavior is described in
https://datatracker.ietf.org/doc/html/rfc7550#section-4.2

The client must handle the case of a server that does not offer both
valid IA_NA and IA_PD options when both are requested, according to RFC
7550. It should not send a new Solicit, but a Request. The client should
however ignore the Advertise message if none of the IA_NA and IA_PD
options are offered by the server.

References: PCF-1390
Signed-off-by: Matthias FRANCK <matthias.franck@softathome.com>
2025-07-31 15:20:52 +00:00
Petr Štetiar
03b8f2dae3
umdns: rebase 0001-add-host-to-the-browse-entry-of-umdns.patch
Rebase patch due to new umdns version in OpenWrt 23.05

References: PCF-952, PCF-1011
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
2025-07-31 15:18:15 +00:00
Matthias FRANCK
3e81b415ce
package: odhcp6c: Add patch to prevent sending of router sollicitations
According to TR181, setting the RSEnable parameter to false should result in no router solicitation messages to be sent from the interface. This seems not the case, the messages are always seen regardless of the parameter value.
To solve this patch odhcp6c to not automatically sends Router Sollicitations as well.

This patch should be properly reworked to make it upstreamable. This progress is tracked in PCF-950

(cherry picked from commit 0f87c3f5a34f85c24e33c174a3baf26df1773056)
2025-07-31 15:18:06 +00:00
Matthias FRANCK
3fc81dad9c
PROVISORY: dropbear: backport bind to interface patch
Dropbear currently only supports binding on IP addresses and not on
interface bounding.  Problem with the IPv4 address binding is that
dropbear needs to restart each time you get a new IP address, breaking
current connections.

Upstream-Status: Merged [https://github.com/mkj/dropbear/pull/229]
Signed-off-by: Diederik De Coninck <diederik.deconinck_ext@softathome.com>
Signed-off-by: Matthias FRANCK <matthias.franck_ext@softathome.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [patch refresh]
(cherry picked from commit cf92a90cc7f0f660048366c12fdde870b0c41850)
2025-07-31 15:18:05 +00:00
Matthias FRANCK
c9b7ff20dc
PROVISORY: odhcpd: Add patch to fix odhcpd can't find physical interface of 'lan'
To translate the logical interface name (e.g. lan) to the physical name (e.g. br-lan)
 - first odhcpd will look in /etc/config/dhcp for dhcp.lan.ifname or dhcp.lan.networkid
 - then, if compiled with WITH_UBUS, odhcpd will look at /etc/config/network and the interface name is overruled even if not found

This patch should be upstreamed. This is tracked in PCF-951.

Signed-off-by: Matthias FRANCK <matthias.franck_ext@softathome.com>
(cherry picked from commit be95bc06b69d27e53528edc99898fc80c6362ac0)
2025-07-31 15:18:04 +00:00
Matthias FRANCK
abc2cb2761
PROVISORY: umdns: Add patch to allow host in services call
For now services and hosts are not linked, umdns need to be modified to allow that link witch is required by tr181

This patch should be upstreamed, this progress is tracked in PCF-952.

Signed-off-by: Matthias FRANCK <matthias.franck_ext@softathome.com>
(cherry picked from commit 637e7e319dcace9c5411b407f2a967b4ff6cce33)
2025-07-31 15:18:03 +00:00
Hauke Mehrtens
4941509f57 uhttpd: update to Git HEAD (2025-07-06)
b3e3c05 client: don't send stray EOF chunk on connection timeout
fad0d05 proc: inhibit chunked transfer encoding on existing TEs or known length
3d6f01b file: prevent writes beyond end of uh_buf on enumerating directories
c7294e7 client: reject requests with multiple content-lengths and/or TEs
7e64e8b client: Allow sending content in DONE state

uhttpd commit 3d6f01b fixes: CVE-2025-32108

Link: https://github.com/openwrt/openwrt/pull/19290
(cherry picked from commit efb4200ba569d6ff79ec58a3c44cd8769ba40fdc)
Link: https://github.com/openwrt/openwrt/pull/19563
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-28 23:23:50 +02:00
Jan Hoffmann
ecb35b36fa ltq-*-app: correctly report downstream band borders
The direction needs to be included in the IOCTL call.

Fixes: b91d7d9d78 ("ltq-*-app: extend ubus metrics/statistics")
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19363
(cherry picked from commit b002cdd6a3b9a469aad91b488c21a0604c01f941)
Link: https://github.com/openwrt/openwrt/pull/19556
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-28 23:17:57 +02:00
David Bauer
ac80abb085 wifi-scripts: correctly set basic-rates with wpa_supplicant
Correctly load the list of basic_rates from UCI. basic-rates shall be
stored as a option-list. The current code did not retrieve this list
correctly.

wpa_supplicant uses a different config option to set basic-rates
when operating in mesh-mode.

Use the correct config key and calculation for mesh-interfaces.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit a854d833eabdbc3b42065927c136d75b981a1021)
2025-07-24 03:46:38 +02:00
David Bauer
eee14dd6db wifi-scripts: add missing mesh_nolearn
Add the missing mesh_nolearn option in order to make it work.

Signed-off-by: David Bauer <mail@david-bauer.net>
2025-06-20 23:51:20 +02:00
Felix Fietkau
d848c2790d hostapd: fix generating own neighbor report for dynamically added/changed interfaces
hostapd_neighbor_set_own_report is normally called from interface setup only.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 985005219020ac1446e28217bfdd7a0a7a7a59d0)
2025-06-20 14:58:29 +02:00
Felix Fietkau
ba25b41913 hostapd: fix dealing with mac address changes for the primary BSS
Ensure that hapd->own_addr is set properly, since hostapd_setup_bss
only handles it for secondary BSS interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3ebf11071159d8b2d238cfd19cadad85059fe7e3)
2025-06-20 14:58:28 +02:00
Robert Marko
09915e64a6 netifd: update to Git HEAD (2025-05-23)
61ae5732adea iprule: amend ipproto netlink nla_put_u32 to nla_put_u8
d610d68c71b8 device: add support for configuring vrf
a1b6386a20a6 device: fix bonding primary port selection
e8bbf246ce2e system-linux: fix sysfs name for all_ports_active flag
723c699e84f4 Restore disable_ipv6 sysctl after removing a device from bridge or bond
d476e18e8d43 iprule: resolve ipproto by name
7901e66c5f27 netifd: iprule add sport and dport

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 15c2ca0a834752cc9505751fc6d2f51861d34dfd)
Link: https://github.com/openwrt/openwrt/pull/19125
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-15 13:59:05 +02:00
Paul Donald
73ea351f6c lldpd: enable hardware inventory information (TLV) management
lldpd can send several hardware inventory TLV fields. Extend the init
script to provide these when the existing flag 'lldpmed_no_inventory' is
disabled. Five new methods provide default values for some of them,
taken from /etc/os-release and /etc/board.json.

There is no homogeneous method to determine the hardware serial number,
so it can be provided manually, as can asset ID.

Note: properties >= 32 characters are truncated at send time (by lldpd),
and some (Cisco) equipment displays junk after strings >= 32 characters.
So truncate to 31.

Tested on: 24.10.0 (known compatible with 22 and 23 also)

===
Example
===

The following lldpd config lines:

 configure inventory hardware-revision "v0"
 configure inventory software-revision "r28427-6df0e3d02a"
 configure inventory firmware-revision "OpenWrt 24.10.0"
 configure inventory serial-number "ABCDEF-123456"
 configure inventory manufacturer "glinet"
 configure inventory model "GL.iNet GL-MT6000"
 # 32 characters:
 configure inventory asset "abcdefghijklmnopqrstuvwxyz 12345"

Produce the following TLV (decoded by Wireshark):

Telecommunications Industry Association TR-41 Committee - Inventory - Hardware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 0110 = TLV Length: 6
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Hardware Revision (0x05)
    Hardware Revision: v0
Telecommunications Industry Association TR-41 Committee - Inventory - Firmware Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0011 = TLV Length: 19
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Firmware Revision (0x06)
    Firmware Revision: OpenWrt 24.10.0
Telecommunications Industry Association TR-41 Committee - Inventory - Software Revision
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Software Revision (0x07)
    Software Revision: r28427-6df0e3d02a
Telecommunications Industry Association TR-41 Committee - Inventory - Serial Number
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0100 = TLV Length: 20
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Serial Number (0x08)
    Serial Number: ABCDEF-123456
Telecommunications Industry Association TR-41 Committee - Inventory - Manufacturer Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0000 1010 = TLV Length: 10
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Manufacturer Name (0x09)
    Manufacturer Name: glinet
Telecommunications Industry Association TR-41 Committee - Inventory - Model Name
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0001 0101 = TLV Length: 21
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Model Name (0x0a)
    Model Name: GL.iNet GL-MT6000
Telecommunications Industry Association TR-41 Committee - Inventory - Asset ID
    1111 111. .... .... = TLV Type: Organization Specific (127)
    .... ...0 0010 0011 = TLV Length: 35
    Organization Unique Code: 00:12:bb (Telecommunications Industry Association TR-41 Committee)
    Media Subtype: Inventory - Asset ID (0x0b)
    Asset ID: abcdefghijklmnopqrstuvwxyz 1234

The Cisco DUT displays:

Hardware Revision: 	v0
Firmware Revision: 	OpenWrt 24.10.0
Software Revision: 	r28427-6df0e3d02a
Serial Number:  ABCDEF-123456
Manufacturer Name: 	glinet
Model Name: 	GL.iNet GL-MT6000
Asset ID: 	abcdefghijklmnopqrstuvwxyz 1234

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18354
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 412c850f07285643a444815ca20d0bbb2afec17e)
Link: https://github.com/openwrt/openwrt/pull/18469
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 21:25:07 +02:00
Antti Seppälä
fd85c0df78 qmi: increase SIM power-cycle timeouts
Some modems and SIM cards take a bit longer to initialize after UIM has been
powered off. Waiting too little time can cause the qmi protocol to end up
in a loop repeatedly power-cycling the SIM card.

Avoid that by
 a) increasing the time we unconditionally sleep after --uim-power-on
 b) increasing the time we allow uqmi to wait for response for --uim-get-sim-state

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18772
(cherry picked from commit d63663601de4feb2b7a049c9b0901f10e79496cb)
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18965
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 21:03:58 +02:00
Leon M. Busch-George
871d7a9d68 qmi: sort config variables a little and fix minor bugs
Group 'local' declarations and 'json_get_vars', sort alphabetically within groups, and split off more generic parameters.

- delegate and sourcefilter were not declared as local variables

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
(cherry picked from commit bf768867dc0eea6b51d2db90a8f1380cc52529c1)
Signed-off-by: Felix Baumann <felix.bau@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/18965
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-06-08 21:03:58 +02:00
Ming Kuang
3f00d6ba01 wifi-scripts: mac80211.sh: add EHT and HE160 support to iw_htmode
For WIFI7 devices (such as mt7925e), the dev width is currently
always "20 MHz (no HT)" in monitor mode.

Add EHT and HE160 support to iw_htmode to fix this issue.
Additionally, the following changes are made:
1. Set iw_htmode to 160MHz for VHT160. The reason for the current
   VHT160 setting is unclear and seems to have been in place for
   over a decade (ibss_htmode [1]). If anyone knows its impact,
   please inform me so I can restore it.
2. Modify MHZ to MHz. The original matching table in the current
   iw tool uses MHz. Although the match is case-insensitive,
   correcting this won't hurt.

[1]: 768d09be87

Signed-off-by: Ming Kuang <ming@imkuang.com>
Link: https://github.com/openwrt/openwrt/pull/18319
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 86eb1c0b5add1e0b493b25508c45b2df9d722c78)
2025-04-10 20:51:56 +02:00
Paul Donald
de2718b2f3 lldpd: add custom-tlv handling
Do not verify the format of TLV. Leave that to lldpd.

These lldpd config entries:

config custom-tlv
	list ports 'eth0'
	option tlv 'replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55'

config custom-tlv
	option tlv 'oui 33,44,44 subtype 232'
	list ports 'br-lan'
	list ports 'eth0'

config custom-tlv # oui-info truncated
	option tlv 'add oui 33,44,33 subtype 66 oui-info 5555555555'

config custom-tlv
	option tlv 'add oui 33,44,31 subtype 44'

config custom-tlv # invalid oui
	option tlv 'add oui 3322 subtype 79'

config custom-tlv # invalid oui
	option tlv 'oui 3312 subtype 74'

Produce the following lldpd.conf content:

configure ports eth0 lldp custom-tlv replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55
configure ports br-lan,eth0 lldp custom-tlv oui 33,44,44 subtype 232
configure lldp custom-tlv add oui 33,44,33 subtype 66 oui-info 5555555555
configure lldp custom-tlv add oui 33,44,31 subtype 44
configure lldp custom-tlv add oui 3322 subtype 79
configure lldp custom-tlv oui 3312 subtype 74

And lldpd (v1.0.13 on v22) logs the following:

Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op replace oui 33:44:55 subtype fe
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:44 subtype e8
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3322'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3312'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: lldpd should resume operations

( The last two TLV are invalid: their oui must be three hex bytes, comma
separated. Only the first hex byte of oui-info 5555555555 is used )

Depends on #14867 and its release version bump

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14872
(cherry picked from commit 8d1fe32c2c46a8de519f9926be2bc062cef66f24)
Link: https://github.com/openwrt/openwrt/pull/18343
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-25 09:52:55 +01:00