Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2198425/?format=api
{ "id": 2198425, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2198425/?format=api", "project": { "id": 22, "url": "http://patchwork.ozlabs.org/api/1.0/projects/22/?format=api", "name": "HostAP Development", "link_name": "hostap", "list_id": "hostap.lists.infradead.org", "list_email": "hostap@lists.infradead.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260219202514.5781-28-andrei.otcheretianski@intel.com>", "date": "2026-02-19T20:24:43", "name": "[27/58] NAN: Reject NDLs with overlapping time bitmaps", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2f4135ae242e4b8e663d964dc90d195013be7d4f", "submitter": { "id": 62065, "url": "http://patchwork.ozlabs.org/api/1.0/people/62065/?format=api", "name": "Andrei Otcheretianski", "email": "andrei.otcheretianski@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260219202514.5781-28-andrei.otcheretianski@intel.com/mbox/", "series": [ { "id": 492721, "url": "http://patchwork.ozlabs.org/api/1.0/series/492721/?format=api", "date": "2026-02-19T20:24:21", "name": "NAN: Add NAN Data Path (NDP) support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492721/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2198425/checks/", "tags": {}, "headers": { "Return-Path": "\n <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=2STlBleg;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256\n header.s=desiato.20200630 header.b=OBHmJRT2;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=Gz7n1CZJ;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fH4h20plpz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Feb 2026 07:28:02 +1100 (AEDT)", "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAcY-0000000ByAW-1Y3R;\n\tThu, 19 Feb 2026 20:27:34 +0000", "from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAcK-0000000Bxqs-3FlE\n\tfor hostap@bombadil.infradead.org;\n\tThu, 19 Feb 2026 20:27:21 +0000", "from mgamail.intel.com ([198.175.65.10])\n\tby desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAc5-00000001pxP-2kAV\n\tfor hostap@lists.infradead.org;\n\tThu, 19 Feb 2026 20:27:08 +0000", "from orviesa004.jf.intel.com ([10.64.159.144])\n by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:26:49 -0800", "from aotchere-mobl1.ger.corp.intel.com (HELO\n aotchere-mobl1.intel.com) ([10.245.246.171])\n by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:26:45 -0800" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=i4smL/f2Erh6Tly6AT186PNpNR5lCT2TVtfk/TBVfoY=; b=2STlBleg8PSsPi\n\t89UzOdZjTlGi1b2fuJCSThQI4m5+qLFYski8AJ0W7uMLUwAwcMezOclZZ9jEbe65EVGc30thlslYg\n\tXCobsgMzFKI7SKJSBDj0tvFsk2k761tCc5NpvVWKtfgDNbspVLO5h7WEUrG+d7OzF5ByjhbCZxtwG\n\tDG0WkJP59HHWSOSsVZSeKpeGfmthlnRGxDPnwr+VsA9yA+oSb3/XpEUPc+nWsIlwm1XJ5TfavygC1\n\tGRi9OkHcLCMbLTH3U8hPzf+PxXD7fucBjR6C/n8c0MD9a7Gc96tK3Jcv9QFDPiUHeskue81RlJUr9\n\tG5L8mzOR1iQaRjl0lvjw==;", "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version\n\t:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:\n\tContent-Type:Content-ID:Content-Description;\n\tbh=Y+F8vA6fP20lCDYIE61VrzHnxsqj6UZNhots5HmH34U=; b=OBHmJRT2ovgMcL5eGxv1uzWLg3\n\tfgENuhnhlywE/pBpQEqqcbxKQTaCGw94Ko+qvM5vkibdyF/badK0BDXhXLHYZVrPGu5H4eLWzVYWQ\n\tb+ro+4viYlpm1ho8yaXBRBOn1uVSQS7Gz2Q8qf0ugJG0nnikfhw3iWt1eKrUgY3IDJsUM+J3uqyau\n\tUXnoa/LLcKeeE3tzNKBQa0t1Uk4OW+WHvzqATL4xfjAZggUNY1AQH/ADrL9hwqyvaG4J/gl3TWixF\n\tLaNILBHUM8lOuzuMP4hEVHaCu7UMYcFd9F++u8bfV2frvo2SJ19KFv555BUVTmXaDRmNSN7xqNRBU\n\tfx41AdaQ==;", "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1771532826; x=1803068826;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=dPQlpWNQKQ0Tv00jNH8DHzVsaqOkQSk/1LFcPJby2ug=;\n b=Gz7n1CZJypo9F0jxk+Svz8EoFzOhZRg9a7P3fE72lSmddBZXw/L9JloV\n +YeMPcsJ0f0gkofgiFoMiagHSicM0oQZ6WgizL8vSFw/b6GPPA8oQMu5C\n eLmlj4sNhDvU7w/7znNY3GPVW5oSdzVTkbmk1LxiltK0tMNBfpDrHeagB\n tqOg3olcp8z6opQDWuZ7pMM4dS8BAcVwjnUSIShG6b+VzqzFbJB8k81rQ\n yKSu13d7LCM8qKItZJ8mhkr87YhZu0V4lMU48ze5Y1SFivWroovW7JVvI\n P+0/5a/K8aZe6+EXDD6/c3GxZUeE2zIGxXr0UbR9jOMAHSGb7y48q9b3A\n Q==;" ], "X-CSE-ConnectionGUID": [ "p7qXEbE2RzWF7/E72mUtIA==", "JbhNN/5kRSCY1Flkf9mf8A==" ], "X-CSE-MsgGUID": [ "4WF8S5PNS06dfwMCc+2BfA==", "CfX4YzmpTNKSYFaSTYMniw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11706\"; a=\"90040050\"", "E=Sophos;i=\"6.21,300,1763452800\";\n d=\"scan'208\";a=\"90040050\"", "E=Sophos;i=\"6.21,300,1763452800\";\n d=\"scan'208\";a=\"219153873\"" ], "X-ExtLoop1": "1", "From": "Andrei Otcheretianski <andrei.otcheretianski@intel.com>", "To": "hostap@lists.infradead.org,\n\tvamsin@qti.qualcomm.com,\n\tvganneva@qti.qualcomm.com,\n\tmaheshkkv@google.com", "Cc": "Ilan Peer <ilan.peer@intel.com>", "Subject": "[PATCH 27/58] NAN: Reject NDLs with overlapping time bitmaps", "Date": "Thu, 19 Feb 2026 22:24:43 +0200", "Message-ID": "<20260219202514.5781-28-andrei.otcheretianski@intel.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>", "References": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>", "MIME-Version": "1.0", "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ", "X-CRM114-CacheID": "sfid-20260219_202707_094929_02F18C22 ", "X-CRM114-Status": "GOOD ( 16.45 )", "X-Spam-Score": "-2.5 (--)", "X-Spam-Report": "Spam detection software,\n running on the system \"desiato.infradead.org\",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n the administrator of that system for details.\n Content preview: From: Ilan Peer <ilan.peer@intel.com> Overlapping bitmaps\n are not allowed in the same availability attribute. Reject NDL with\n INVALID_AVAILABILITY\n reason in such case. While at it, change the APIs so the rejection reason\n code would be pro [...]\n Content analysis details: (-2.5 points, 5.0 required)\n pts rule name description\n ---- ----------------------\n --------------------------------------------------\n -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/,\n medium trust\n [198.175.65.10 listed in list.dnswl.org]\n 0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [198.175.65.10 listed in sa-accredit.habeas.com]\n 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n query to Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [198.175.65.10 listed in\n sa-trusted.bondedsender.org]\n 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n Validity was blocked. See\n https://knowledge.validity.com/hc/en-us/articles/20961730681243\n for more information.\n [198.175.65.10 listed in\n bl.score.senderscore.com]\n -0.0 SPF_PASS SPF: sender matches SPF record\n 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from\n author's\n domain\n -0.1 DKIM_VALID Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from\n envelope-from domain\n 0.1 DKIM_SIGNED Message has a DKIM or DK signature,\n not necessarily valid\n -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender", "X-BeenThere": "hostap@lists.infradead.org", "X-Mailman-Version": "2.1.34", "Precedence": "list", "List-Id": "<hostap.lists.infradead.org>", "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=unsubscribe>", "List-Archive": "<http://lists.infradead.org/pipermail/hostap/>", "List-Post": "<mailto:hostap@lists.infradead.org>", "List-Help": "<mailto:hostap-request@lists.infradead.org?subject=help>", "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Sender": "\"Hostap\" <hostap-bounces@lists.infradead.org>", "Errors-To": "hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org" }, "content": "From: Ilan Peer <ilan.peer@intel.com>\n\nOverlapping bitmaps are not allowed in the same availability attribute.\nReject NDL with INVALID_AVAILABILITY reason in such case.\nWhile at it, change the APIs so the rejection reason code would be\npropagated correctly.\n---\n src/nan/nan_i.h | 2 +-\n src/nan/nan_ndl.c | 20 +++++++++++---------\n src/nan/nan_util.c | 20 ++++++++++++++++++--\n 3 files changed, 30 insertions(+), 12 deletions(-)", "diff": "diff --git a/src/nan/nan_i.h b/src/nan/nan_i.h\nindex f5448fb55e..39d23ffa93 100644\n--- a/src/nan/nan_i.h\n+++ b/src/nan/nan_i.h\n@@ -455,7 +455,7 @@ struct bitfield *nan_tbm_to_bf(struct nan_data *nan,\n \t\t\t struct nan_time_bitmap *tbm);\n struct bitfield *nan_sched_to_bf(struct nan_data *nan,\n \t\t\t\t struct dl_list *sched,\n-\t\t\t\t u8 *map_id);\n+\t\t\t\t u8 *map_id, enum nan_reason *reason);\n bool nan_sched_covered_by_avail_entry(struct nan_data *nan,\n \t\t\t\t struct nan_avail_entry *avail,\n \t\t\t\t struct bitfield *sched_bf,\ndiff --git a/src/nan/nan_ndl.c b/src/nan/nan_ndl.c\nindex 28e7a73d9e..0f458eef74 100644\n--- a/src/nan/nan_ndl.c\n+++ b/src/nan/nan_ndl.c\n@@ -191,35 +191,36 @@ struct nan_ndl *nan_ndl_alloc(struct nan_data *nan)\n }\n \n \n-static int nan_ndl_validate_peer_avail(struct nan_data *nan,\n-\t\t\t\t struct nan_peer *peer)\n+static bool nan_ndl_validate_peer_avail(struct nan_data *nan,\n+\t\t\t\t\tstruct nan_peer *peer)\n {\n \tstruct nan_ndl *ndl = peer->ndl;\n-\tint ret;\n+\tbool ret;\n \n \t/* first validate if immutable is covered by the availability map */\n \tret = nan_sched_covered_by_avail_entries(nan, &peer->info.avail_entries,\n \t\t\t\t\t\t ndl->immut_sched,\n \t\t\t\t\t\t ndl->immut_sched_len);\n-\tif (ret <= 0) {\n+\tif (!ret) {\n \t\twpa_printf(MSG_DEBUG,\n \t\t\t \"NAN: Peer avail: Immutable is not covered by avail\");\n-\t\treturn -1;\n+\t\treturn ret;\n \t}\n \n \t/* now validate NDC schedule is covered by the availability map */\n \tret = nan_sched_covered_by_avail_entries(nan, &peer->info.avail_entries,\n \t\t\t\t\t\t ndl->ndc_sched,\n \t\t\t\t\t\t ndl->ndc_sched_len);\n-\tif (ret <= 0) {\n+\tif (!ret) {\n \t\twpa_printf(MSG_DEBUG,\n \t\t\t \"NAN: Peer avail: NDC is not covered by avail\");\n-\t\treturn -1;\n+\t\treturn ret;\n \t}\n \n \twpa_printf(MSG_DEBUG,\n \t\t \"NAN: NDL: peer NDC and immutable are covered by avail\");\n-\treturn 0;\n+\n+\treturn ret;\n }\n \n \n@@ -349,6 +350,7 @@ nan_ndl_match_sched_vs_common(struct nan_data *nan,\n \tu8 map_id;\n \tenum nan_ndl_ver verdict;\n \tint ret;\n+\tenum nan_reason reason;\n \n \t/* No constraints */\n \tif (!sched || !sched_len)\n@@ -363,7 +365,7 @@ nan_ndl_match_sched_vs_common(struct nan_data *nan,\n \t\treturn NAN_NDL_VER_SCHED_NONE;\n \n \t/* Convert the schedule availability entries to map ID and bitfield */\n-\tsched_bf = nan_sched_to_bf(nan, &sched_entries, &map_id);\n+\tsched_bf = nan_sched_to_bf(nan, &sched_entries, &map_id, &reason);\n \tnan_flush_avail_entries(&sched_entries);\n \n \t/*\ndiff --git a/src/nan/nan_util.c b/src/nan/nan_util.c\nindex 8bee05c50e..7a7c276e50 100644\n--- a/src/nan/nan_util.c\n+++ b/src/nan/nan_util.c\n@@ -1044,6 +1044,7 @@ done:\n * @nan: NAN module context from nan_init()\n * @sched: List of availability entries representing the schedule entries\n * @map_id: On return would hold the map_id covered by the schedule entires\n+ * @reason: In case of failure contains the reason.\n * Returns A bitfield representing the schedule on success; otherwise NULL\n *\n * Note: The function only supports converting a schedule where all map IDs are\n@@ -1051,7 +1052,7 @@ done:\n */\n struct bitfield *nan_sched_to_bf(struct nan_data *nan,\n \t\t\t\t struct dl_list *sched,\n-\t\t\t\t u8 *map_id)\n+\t\t\t\t u8 *map_id, enum nan_reason *reason)\n {\n \tstruct bitfield *sched_bf = NULL;\n \tstruct nan_avail_entry *cur;\n@@ -1068,6 +1069,7 @@ struct bitfield *nan_sched_to_bf(struct nan_data *nan,\n \t\t} else if (cur->map_id != *map_id) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t \"NAN: No support for multiple maps\");\n+\t\t\t*reason = NAN_REASON_RESOURCE_LIMITATION;\n \t\t\tgoto fail;\n \t\t}\n \n@@ -1075,6 +1077,7 @@ struct bitfield *nan_sched_to_bf(struct nan_data *nan,\n \t\tif (!tmp) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t \"NAN: Failed to convert sched to bf\");\n+\t\t\t*reason = NAN_REASON_UNSPECIFIED_REASON;\n \t\t\tgoto fail;\n \t\t}\n \n@@ -1085,11 +1088,20 @@ struct bitfield *nan_sched_to_bf(struct nan_data *nan,\n \t\t} else {\n \t\t\tint res;\n \n+\t\t\tif (bitfield_intersects(sched_bf, tmp)) {\n+\t\t\t\twpa_printf(MSG_DEBUG,\n+\t\t\t\t\t \"NAN: Invalid availability: TBMs intersect\");\n+\t\t\t\t*reason = NAN_REASON_INVALID_AVAILABILITY;\n+\t\t\t\tbitfield_free(tmp);\n+\t\t\t\tgoto fail;\n+\t\t\t}\n+\n \t\t\tres = bitfield_union_in_place(sched_bf, tmp);\n \t\t\tbitfield_free(tmp);\n \t\t\tif (res) {\n \t\t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t\t \"NAN: Failed to union sched bf\");\n+\t\t\t\t*reason = NAN_REASON_UNSPECIFIED_REASON;\n \t\t\t\tgoto fail;\n \t\t\t}\n \t\t}\n@@ -1230,6 +1242,7 @@ bool nan_sched_covered_by_avail_entries(struct nan_data *nan,\n \tstruct bitfield *sched_bf, *avail_bf;\n \tu8 map_id;\n \tbool ret = false;\n+\tenum nan_reason reason;\n \n \tif (!sched || !sched_len)\n \t\treturn true;\n@@ -1239,7 +1252,10 @@ bool nan_sched_covered_by_avail_entries(struct nan_data *nan,\n \t\t\t\t\t\t &sched_entries,\n \t\t\t\t\t\t sched, sched_len);\n \n-\tsched_bf = nan_sched_to_bf(nan, &sched_entries, &map_id);\n+\tsched_bf = nan_sched_to_bf(nan, &sched_entries, &map_id, &reason);\n+\tif (!sched_bf)\n+\t\treturn false;\n+\n \tnan_flush_avail_entries(&sched_entries);\n \n \tavail_bf = nan_sched_bf_from_avail_and_chan(nan, avail_entries,\n", "prefixes": [ "27/58" ] }