From patchwork Sat Sep 26 05:39:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hc86862997@gmail.com X-Patchwork-Id: 2314459 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=vUCuzy5K; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=L1RnxilD; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hwRGY7188z1xvt for ; Thu, 01 Oct 2026 19:20:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bVdxXU8D3Jc4ExSV7iFZlVLV8S6blkv7+CJrUbetcBw=; b=vUC uzy5KtqfhnoHK9WajlYCx/C3jj3EC8r/3pN/aVYuZk+HBKo5rsXyyjNCb6n5yyUlEj+i5ycDFBS/2 Z1mIqex2UPiyOgOYGPXAud5nwCrX4UlmWhgMhaRXDQokLKlIyah9NHLYe+SrJIs/jrc07yqFRFWE/ UvpFgc8wR5svvXj/TAFB4GoES5c8Pso+0Ju/VguKxBAKk9fLu8WMVHQhze1P3Xtcaq+4Esafw/ckJ 5WgRoLEUitnE/xtrj9q32V8VNBfRykPKjyWAkiPnE06EDHF8VnOHvbCctNkESi14sGZwNMEF8UEF+ aH5nO9RHZYzkAlO7wZkFWSyg/B5V9kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xCCwf-00000008LAw-40LT; Thu, 01 Oct 2026 09:19:17 +0000 Received: from mail-ed2-x0d.google.com ([2a00:1450:4864:33::d]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xAUVA-0000000Fb48-17BT for hostap@lists.infradead.org; Sat, 26 Sep 2026 15:39:49 +0000 Received: by mail-ed2-x0d.google.com with SMTP id 4fb4d7f45d1cf-6ab4b93bbe9so756236a12.2 for ; Sat, 26 Sep 2026 08:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1790437186; cv=none; d=google.com; s=arc-20260327; b=akRZjJimUCPBtkWxsfmFE3GpfLU63wXibxuFjZTzGgDJCI2Qa6OOS3Wiagb8FpXayk XXUBIR+8JDNPn1/vSFlTDAl7WMQpIKOAn08AIPIO4CjEgqg9uYh6iqh9RfxlPc3f/KtE 02cft02NHZEif9CJ78Astg4T0DpsyPcXn1cUnd7BsDUHks3Na3SaTFguLNDb9KLuZeiD fhp+tx19pydrSTboQezTnml1pgsYRBIWDcYQcCW9lYvANF/io20z3drurp2kciRaWKhR IdFGfQdv/vwRqmKAvwcAQCASi7I3tfSOjDBeB926DeWDbHDNShoeG3Lcskv8qnHbgxDa nR9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=Z8baeKLavKq1Vddpjydsi0lQB/ty640u4bZSpaBe2bE=; fh=RepBDIVbUTRsjfbrO/5AjcaOU1JdnBduCNdRP0Vpu7Q=; b=loc3SK9LBjGUiG3HK1ttcmKVcjVnjk+vNHIGsbdYpPr4P6z/b9nvroV4w+UY+hUX5A PlF1jwRu9CvYXmBUxHa49Hs+iv4F4jZlsPPlTVeC4kohLoc4OjY/kU5SVj9PIgY6eqVL cpKZfO5ygLKmPN9FJu44xwAfrOARFTJb76TBzYtNZ2nDz0Hf7RjLW1gbcC7Mqy3IhASM LkeZlLNGsSzv71l61FaT6QOz3zJYswZt29X/jmGjGgBbmxVCDjvc93z9Su+xYMjf8vEh ICfdfuJkXcn6fC+fqHccs0BfZ+SkA5nNKJrqfLFmA4HAgUok3l4iz9ziwMSTSxngUM2M 2L8A==; darn=lists.infradead.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790437186; x=1791041986; darn=lists.infradead.org; h=content-type:to:subject:message-id:date:from:mime-version:from:to :cc:subject:date:message-id:reply-to:content-type; bh=Z8baeKLavKq1Vddpjydsi0lQB/ty640u4bZSpaBe2bE=; b=L1RnxilDzlYEsKK+Fn8moLpyYt9kNgVEukj53/ePxgVF/ElYg7U90opqOnNQyM0gto 2Af+aM2WRR33Pg6mxuXChMmqqFLa7k+RfiAWma/BMJlzSPBEdg5glzWBXB7lCCvchPVn 3jnTsnftC76DrLay/bC6rBObXPzuHIlzn0YutXiJn90ZpN0a82lLjOTQY15fmhqJEwAC BdPwljOQyvy36dOUUoF3roLeY/86ANwpXBMf7GU8tZMNaM/Kb9bKhqudTOcP9YeFcp6f wT669V+1pfKZtMdnPruvg24GS9r3TjlH0VUZJ/iW0GfuiX0Rgj6mEdNu1SRH5tItQ54d a7QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790437186; x=1791041986; h=content-type:to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Z8baeKLavKq1Vddpjydsi0lQB/ty640u4bZSpaBe2bE=; b=pse97GcebMrUnKG83M+2zfi90sWoc432/JVPcIl7GGD4ZJzAN5T/MoVHKAHQwd927D ajg/x223onQ/cyi+28Oh/f+qygibAEeMmB8mm4gR6GGyj8nCp2Jt4VACnxJusA/JDjsb pPMXc+mgYizKKYOVyC+LDyNaNyzJoQcapg94Fmtdh7uUgATd9d3OHPZbpxLeJj5RIJWQ rxH6FC3mWNoWlUHjO+T+1WAPaGh+fG3O3ZR7BA4GYks1KhakoBVZv3jM0t2goivNZjHp z2EdgPUqUDcr9PaCLRkGZzMhynkjoCSGFGWYu1SwXI6+cJHhklBFLrMue8CXRVXGepeU FvAQ== X-Gm-Message-State: AFq9FYL6w2BiOWzk2qhckcx6cuIpl5cupYhatvMeLq7/YqlKQg8mNcfr c6ZCanwRs7fheVlyKDfxzTmxtZztT0I3xG/dg3F6NmpbW4gdLi+2QYGZYLHPVv+hLQk62OASTVw N3J2Nv4ZxLKK6PsvtWWB6QFYiS/aqE/y1UeIeiiA= X-Gm-Gg: AYBFou1hAch2KxI1jOpkXF7VIn/AwFt895Cp1nGC3fCwX8tiNm0ZjhkEd3hnjKqOPEB UuwmhZ1tYy4YmICr3Z4oZSaGktKo5pps4nUvKO1jM/5wvNDamMtg1o0nYW/HDZHd3YpfVhzfp+e do5/lNscxoRUDjVJvkDJ3uqWSMFypf3rgf8LjKBUH0M7KZ6NzNgY9xCqTiD9hA3mQGoTNhWmgnx wuD0uh62G5slxZEcyOp6FXB0Oz1lcOdRN5VgAN4ML3vjWrweAJbbkKJegKEXm1oSWKK89q+/15U N8CLt4HHK/gyBtJsY0WFKBycuAFhuziC/wVW2zOYnB2cZtWmxHGPTQ== X-Received: by 2002:a05:6402:a0ca:b0:6a9:a5d6:622d with SMTP id 4fb4d7f45d1cf-6aac8f40e26mr6904406a12.3.1790437185381; Sat, 26 Sep 2026 08:39:45 -0700 (PDT) Received: from 77377267392 named unknown by gmailapi.google.com with HTTPREST; Sat, 26 Sep 2026 15:39:44 +0000 Received: from 77377267392 named unknown by gmailapi.google.com with HTTPREST; Sat, 26 Sep 2026 15:39:44 +0000 MIME-Version: 1.0 From: hc86862997@gmail.com Date: Sat, 26 Sep 2026 15:39:44 +0000 X-Gm-Features: AclHuK_bVZqUa2m20hgXX77f1GNoJXxQsXg7Nj12OmvcaeZnGobthQTGND2FLd0 Message-ID: Subject: [PATCH] ap: skip untagged STA VLAN binding for MLO stations To: hostap@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260926_083948_332019_3B1DED33 X-CRM114-Status: GOOD ( 13.37 ) X-Spam-Score: -1.9 (-) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, hostapd's dynamic-VLAN-for-MLO support sends SET_STATION with NL80211_ATTR_STA_VLAN (plus the MLD link id) for MLO stations even when no VLAN is configured (vlan_id == 0), and the bind is deliberately [...] Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [hc86862997(at)gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [hc86862997(at)gmail.com] -0.0 DMARC_PASS DMARC pass policy X-Mailman-Approved-At: Thu, 01 Oct 2026 02:19:16 -0700 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, hostapd's dynamic-VLAN-for-MLO support sends SET_STATION with NL80211_ATTR_STA_VLAN (plus the MLD link id) for MLO stations even when no VLAN is configured (vlan_id == 0), and the bind is deliberately not skipped for vlan_id == old_vlanid == 0 (the "needs rebind after sta_remove" path in ap_sta_bind_vlan_helper()). On kernels without ML VLAN support (no CFG80211_STA_AP_ML_STA; mac80211/cfg80211 reject VLAN operations for ML stations) the kernel answers -EINVAL, and every rebind - triggered by association and by each rekey/EAPOL reauth - fails association processing and tears the MLO client down: hostapd: nl80211: NL80211_ATTR_STA_VLAN (addr= ifname=ap-mld1 vlan_id=0) failed: -22 (Invalid argument) Observed as a Wi-Fi 7 MLO client being kicked off an ap-mld interface every ~60-90 seconds, deterministically, on MT7996 AP hardware (hostapd 831364bf, kernel 6.18.53 / backports 7.2). These two guards skip the driver call for untagged MLO stations only; dynamic VLAN keeps its previous behaviour until the kernel side gains ML VLAN support: 1. src/ap/sta_info.c - skip the helper-level bind for MLO stations with vlan_id == 0 (covers the normal association path). 2. src/drivers/driver_nl80211.c - funnel guard in i802_set_sta_vlan(): skip any untagged (vlan_id == 0) bind that carries a link id, which covers every caller by construction. With this applied, zero STA_VLAN errors across many MLO associations and rekeys, and the client stays connected; legacy clients on non-MLD interfaces and dynamic-VLAN users behave exactly as before. (Also reported to OpenWrt, which carries the patch: https://github.com/openwrt/openwrt/issues/25415 ) Signed-off-by: line from the author or copyright holder of the patch to --- src/ap/sta_info.c | 13 +++++++++++++ src/drivers/driver_nl80211.c | 12 ++++++++++++ 2 files changed, 25 insertions(+) --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -1493,6 +1493,19 @@ } #endif /* CONFIG_IEEE80211BE */ + /* + * The kernel side used in this build rejects VLAN operations for + * MLO stations with -EINVAL (see the driver_nl80211.c part of this + * patch), and the error makes ap_sta_bind_vlan() fail association + * processing, which bounces MLO clients. An untagged station + * (vlan_id 0) has no VLAN binding to perform anyway, so skip the + * driver call in that case. Dynamic VLAN together with MLO keeps + * its previous (rejected) behaviour until the kernel side gains + * ML VLAN support. + */ + if (ap_sta_is_mld(hapd, sta) && sta->vlan_id == 0) + return 0; + if ((sta->flags & WLAN_STA_WDS) && sta->vlan_id == 0) { wpa_printf(MSG_DEBUG, "Do not override WDS VLAN assignment for STA " --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -9134,6 +9134,18 @@ ", ifname=%s[%d], vlan_id=%d)", bss->ifname, if_nametoindex(bss->ifname), MAC2STR(addr), ifname, if_nametoindex(ifname), vlan_id); + /* + * Every STA VLAN binding funnels through here. On an MLD AP each + * command carries NL80211_ATTR_MLO_LINK_ID, and the kernel side + * used in this build (no ML VLAN support) rejects such untagged + * binds with -EINVAL, which hostapd turns into a station teardown. + * vlan_id 0 carries no VLAN semantics, so skip the command whenever + * a link id is present; the station stays bound to its own BSS + * interface as intended. Dynamic VLAN (vlan_id > 0) keeps its + * previous behaviour. + */ + if (vlan_id == 0 && link_id != NL80211_DRV_LINK_ID_NA) + return 0; if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_STATION)) || nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, addr) || (vlan_id && (drv->capa.flags & WPA_DRIVER_FLAGS_VLAN_OFFLOAD) &&