From patchwork Fri Dec 22 10:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Otcheretianski X-Patchwork-Id: 1879265 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=Tt6QhrZm; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=JrrMtqj4; 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 4SwwNy4kHCz1ydZ for ; Fri, 22 Dec 2023 03:09:38 +1100 (AEDT) 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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OymzaouSVKb0/QB+vVH7tPfd6daMfJR4uiVR3go4upo=; b=Tt6QhrZmnBksjn H/PGUyOzLLsMCSbIVWb1VnB1yJa+i3nsRYz1tl403MC4zPxW8ZCPCyDJ2mSbZGsxr0SZL9TixO6QY XWjmtSR803XVRPHxU0b68RuYaYK2xvQi0EolUUwd7CswYU7fdcxbRQb1uYBwXJ8IfFJcOGO5I3aWc 9vzkZ+AR9GXls0B3Ao54xyb+52XmTsi2L/IkHpOeN+bbwM/563/Kr6BpdNGolhyle7xhFKW9boF3U 9cwdN8orGTG+vIlUqRrPOJWBfn3ipgvxtxOrEziFZnCyFyzK1PCWlkbs5k+nHowV+ZGCihe8EaNNc l3RnJD54Fhw9g7K6+nPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rGLbR-003Ruh-2J; Thu, 21 Dec 2023 16:08:53 +0000 Received: from mgamail.intel.com ([192.55.52.120]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rGLbO-003Rsl-2a for hostap@lists.infradead.org; Thu, 21 Dec 2023 16:08:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703174930; x=1734710930; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=abbMxRT9VvtOdS3AFVxRMFtXpYFShFMjhmSeXGcRRNs=; b=JrrMtqj4YBX0g19TEZphl+ny70GwRTibpHO8ThwQ6tqY2MS/csr83Llt gUBQ+k4Q53YTa4HF2RHLhEXO2jzvIAhc+pnHrgmt8+sfmKE5V0WZqC/cZ GGmTUbv5I3rnEVLoAczJgW7TLv4+KD9/dLLDqDIIJpQN8WNKwnaf2LKyD kH2FXN7teL1cihbz1oFyScHZAycoq4gDixi8GhVBkaN8zehBM1AxpJEZ9 b+/bubieQEpWYy7MLamaY50NV41aaPVuWVwSi7bgcOPeBHVgbIoSd5xI0 jsQqAmHX2HIa2DQUcNacXS6Y59eWcpPoNxNpDVP3Lw+UBcd2AYYXO/zeq g==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="394886322" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="394886322" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 08:08:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="811014557" X-IronPort-AV: E=Sophos;i="6.04,293,1695711600"; d="scan'208";a="811014557" Received: from unknown (HELO WEIS0042.iil.intel.com) ([10.12.217.211]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Dec 2023 08:08:38 -0800 From: Andrei Otcheretianski To: hostap@lists.infradead.org Cc: Johannes Berg , Andrei Otcheretianski Subject: [PATCH] ctrl_iface: fix newline in print_ml() Date: Fri, 22 Dec 2023 12:06:09 +0200 Message-ID: <20231222100609.163347-1-andrei.otcheretianski@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231221_080850_847256_4449D96A X-CRM114-Status: GOOD ( 11.01 ) X-Spam-Score: -0.2 (/) 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: From: Johannes Berg We only print the newline if the AP MLD ID is present (BASIC_MULTI_LINK_CTRL_PRES_AP_MLD_ID), fix that. Signed-off-by: Johannes Berg Signed-off-by: Andrei Otcheretianski --- wpa_supplicant/ctrl_iface.c | 7 ++++++- 1 file changed, 6 insertions(+ [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [192.55.52.120 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 2.5 DATE_IN_FUTURE_12_24 Date: is 12 to 24 hours after Received: date -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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 -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender 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 From: Johannes Berg We only print the newline if the AP MLD ID is present (BASIC_MULTI_LINK_CTRL_PRES_AP_MLD_ID), fix that. Signed-off-by: Johannes Berg Signed-off-by: Andrei Otcheretianski --- wpa_supplicant/ctrl_iface.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index d05c9b8450..eedb1d6be4 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5252,7 +5252,7 @@ static int print_ml(struct wpa_bss *bss, char *pos, char *end) if (common_info_length < 1) return 0; - ret = os_snprintf(pos, end - pos, ", MLD ID=0x%x\n", *ie); + ret = os_snprintf(pos, end - pos, ", MLD ID=0x%x", *ie); if (os_snprintf_error(end - pos, ret)) return 0; pos += ret; @@ -5260,6 +5260,11 @@ static int print_ml(struct wpa_bss *bss, char *pos, char *end) common_info_length--; } + ret = os_snprintf(pos, end - pos, "\n"); + if (os_snprintf_error(end - pos, ret)) + return 0; + pos += ret; + return pos - start; }