From patchwork Wed May 21 16:06:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pablo MG X-Patchwork-Id: 2088775 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=Equl+PfW; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=freebox-fr.20230601.gappssmtp.com header.i=@freebox-fr.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=itfCHZ3i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) 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 4b2bvq0Xsfz1yDL for ; Thu, 22 May 2025 02:09:10 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:From:To:MIME-Version:Date:Message-ID: 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=Ajhip16YlmYwHKWtuUrFfH0VG5NpcvMO+WLIN26/nm8=; b=Equl+PfWdcLSVf XII7d2GHNAS65hhFJupYp5mPiDXBACnIoFGxeUP1uFS7o4BuDQgHQ7JHZqoa0u5dL3BNGF4OUj2iK JkJucvDvRQhh86iUKJalOvlc0WurB1tCEmec/B3pqfgjUTvnAKM8dYwrws2bNbXt/XMmST6VE0I0r Ql0ffxMaqU+YwLqqN+ZFyDBAR2Ob9NuEodWeao0ev977UEaZq3EMz4ujh10et2ecQRdgauXnCQjMV /X5I0m6zDetzcbH8+uja6DzVxMrySsBrcd3aurYB/9fJMvaC18CVKUAR4GHrMKmGZ1nlZDJHc6/eO z2WtZJt0Ay6HExroScOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uHlzp-0000000GQ6j-1uYh; Wed, 21 May 2025 16:08:45 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uHlxg-0000000GPbS-22Ns for hostap@lists.infradead.org; Wed, 21 May 2025 16:06:34 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-3a376ba6f08so1880126f8f.1 for ; Wed, 21 May 2025 09:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebox-fr.20230601.gappssmtp.com; s=20230601; t=1747843590; x=1748448390; darn=lists.infradead.org; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=qyOgJaCrzNjMtXkMnffW0vHLrc1/0piWLid9VDatD2c=; b=itfCHZ3iJkVscTML3A3q05Y2TMr7wkFiOAqT0hHBFj94lRZEbqQGnVIFuSpZ4P2BVV Ezvm45ptckkltSNFS2FcousfVkC9XuwfkJVBkbND+nnzYUob9KNtodjpqBkyVVCpGZ4T 1upLQJLQme9GhsEcc9Ei8CINY0hyzMVKnEdh79Pjs80FJk2ih0jvvI7fOixM70SrklYF SgVJO9+ClChXRpLtoGR/eOAijiNhlO3do3DqTqEbxmto3qL4Wb+dFUp5nsfUKNfs5mUF 77+I8oIMg0LwS6xLVOVV2XymsTCG87/NTZaK8geUQjiCVobFemyPDFgOz3z2TLXcLqCB 5brQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747843590; x=1748448390; h=content-transfer-encoding:subject:from:content-language:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=qyOgJaCrzNjMtXkMnffW0vHLrc1/0piWLid9VDatD2c=; b=iUTfhlGYmEQWQ1WKwDi+YxBhrGZnoABv2cHmpngCq0TsKBv0LM3Q1IooNyi6dPdDLS uarG7BgJyoDbkDMu5wjaDkhlJEEch7VfU+JZY1z4cAMZpGZujToX//Xl428rcwx9pItw oEd3vATs98RSn80wlVegnWrvSA6cHNXBoMt3eispOqXRj4LCcmpUJQECriZK3gM+I8oL fN1HFmbtLurU0foy4DMOqxKORjlQveeZSKfUFYi92vas9/hETLVsD4OY9lB6BldnCssy T5jP5rfWqmtRu3dxj9W+fz9VdpapdT9yU1wOOmTZW5sL6TC+IrMwOyYaqNf2nFpIWUrP kEIg== X-Gm-Message-State: AOJu0YyFKRiiYJd+2aDP+XmsD1aolmfN3nLZIjzvit8J4QwP/6uUf+Bv GprVBk+toSQD/uH1pl3O3UMA+bz6S2IvhwBuz0YVe6JatgwRm21jSZZkBZW1ldHOaAv2VSDjVJw wIjXH X-Gm-Gg: ASbGncucSO/fqPfV6YTJZTGmTeyYm9SV6iB5JG1OtHm1kglmjY9vXvDpeSU5zna/y1n kuvyzi0hSDOCc5419uSXm+UhsMpQWPMPljBNV16YUx/N4IU1AMFSif4a5IuUx6f8kRaqw7hKn2+ U1zilzwB3dlJSUMfxDo4K5g+9OJQCVe+8xoBMKmpPhIn1mMhH1alavP2WjXna+Kftv+Re4JiT/W hxtTtWnUuq/2UpPlmrwruMJ/iQhLaX/DRjuog/zidvzilqpscWYPO/JZpaVgKx+agyGmjP6EgM4 8qUma9+4CCLAdj2lcliNQvpgO88/oL/3H2B76EgSWBbw6mMECafn85fHyZJycnHrx65MHBxCX9C KPHcRGZU= X-Google-Smtp-Source: AGHT+IFu+O1kAh+9gEbvmPVp/DsGxMxd3HzFjqRQPBX3rWgDbqXpg4AjjIgum/DgfRNbpyYxAsc1fw== X-Received: by 2002:a05:6000:1445:b0:3a3:643e:2542 with SMTP id ffacd0b85a97d-3a3643e256dmr17012135f8f.26.1747843589699; Wed, 21 May 2025 09:06:29 -0700 (PDT) Received: from [192.168.108.121] (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca888afsm20506571f8f.64.2025.05.21.09.06.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 May 2025 09:06:29 -0700 (PDT) Message-ID: <3c483f83-ca86-40b3-842b-cbb6f0e5d1ca@freebox.fr> Date: Wed, 21 May 2025 18:06:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: "hostap@lists.infradead.org" Content-Language: en-US From: Pablo MARTIN-GOMEZ Subject: [PATCH] hostapd: send own Neighbor Report only if specific Measurement Request X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250521_090632_728290_86E18481 X-CRM114-Status: GOOD ( 10.24 ) 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: Every Neighbor Report that matches the requested SSID is sent in the Neighbor Report Response, including our own report. According to standard IEEE 802.11-2020 (11.10.10.3), the self report should not [...] Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42a listed in] [list.dnswl.org] -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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 Every Neighbor Report that matches the requested SSID is sent in the Neighbor Report Response, including our own report. According to standard IEEE 802.11-2020 (11.10.10.3), the self report should not be included in the response unless the request includes a LCI Measurement Request or a Location Civic Measurement Request. Signed-off-by: Pablo Martin-Gomez ---  src/ap/rrm.c | 4 ++++  1 file changed, 4 insertions(+)          send_lci = (lci != 0) && hostapd_check_lci_age(nr, lci_max_age);          len = hostapd_neighbor_report_len(buf, nr, send_lci, civic); diff --git a/src/ap/rrm.c b/src/ap/rrm.c index fbcddf3f9..0fdda9958 100644 --- a/src/ap/rrm.c +++ b/src/ap/rrm.c @@ -227,6 +227,10 @@ static void hostapd_send_nei_report_resp(struct hostapd_data *hapd,              os_memcmp(ssid->ssid, nr->ssid.ssid, ssid->ssid_len) != 0)              continue; +        /* Only send own report if Measurement Type is LCI or Location Civic. */ +        if (!civic && !lci && os_memcmp(hapd->own_addr, nr->bssid, ETH_ALEN) == 0) +            continue; +