From patchwork Mon Jun 25 20:24:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouke Witteveen X-Patchwork-Id: 934543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GdsxK/4S"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="nDzO13Rj"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41F0z81k7fz9ry1 for ; Tue, 26 Jun 2018 06:25:08 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date: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=rRb9G4YtF2ODdoEKzLSxlBKmu9GRRx5oTXp7yxDm1cA=; b=GdsxK/4SODTvhs 7lpKmX5/gM4+a2vlfOARu5FMBKdP2E0NMjmyRn4CL1q5wb2+sLp+Nh2eifO9q+Srs9FYypCn06qmY N9ept+58lVUDPndt12BqodObzpZJce+UiodRzq1PMBGkbziNMzukSRevpf29hpLy2lNuzbFiQGThv s8p5UBIwXNef8dNrc8b8e2aRaIe+WnbuSNeOEuZLMYIBTAz/uXN2CcD5uYwdChpP7YY1Xy9zEojgz mmN9fB6wgVatLOH1WmKHYmPwywfd2xrDhczFrfT+Wvq1S1cfAXutmZSa11T8qBDatxlOLxsEgSho8 GI3wHAx97yZcIQAueDmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXY2b-0007Fn-Js; Mon, 25 Jun 2018 20:24:49 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXY2L-0007EL-Lh for hostap@lists.infradead.org; Mon, 25 Jun 2018 20:24:34 +0000 Received: by mail-ed1-x541.google.com with SMTP id a5-v6so6210293edt.5 for ; Mon, 25 Jun 2018 13:24:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=2tp7WVBQTH1zuL5ye1MexpNnZsbwB3NoWlen5X2C9AI=; b=nDzO13Rj2WSo+q1iW8YwrJWRJBfIULQd+sQo8iMn1Xqc5KRuiehRKNrcE/1UwgpqvY eFDmyG/AJrew0Ha0kjqsE/wFArgK6fnnVOLsdQoqPeBLvFXGNlHO9tBiWUbQg23o3ME7 FNScx5cfsphi2/oHb4HCL5Xbbi5ODt+pZ/NigKASnAfNMdo8MsaJiitcfYDH2IuD88UN a7j6dyjTGXZYVNbod3pFw0Hl2/LPe5adlG+lh126gWAMNqSXCwJVt7km57VScFGqGzN5 x4X5x6eX3qlesd7T1p5ph+A/QcB/dQtTnqNfe7GLSgZlAHyA1fq1kQVj0W76M2ASk6wg UHXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=2tp7WVBQTH1zuL5ye1MexpNnZsbwB3NoWlen5X2C9AI=; b=YQQP0vCw4LISd1Kx825K7vBmUsKxkH4OEXaNhJ27rK2noW6zwYLJbmPMuysOZISzyo sme68LlqwlhFk5TLxfg1WKUbn2nMtHOQ3CJJ1R3p5t/NXM85ShcZ0Y0HCiWFJWmRUCMz KAyb7NAU65J75eztmWIAXfX607QijdNozbwg0IPxkErIY4f3OyHHClae2obBtFr46Xu7 5BM2AUviyPc2dYk1Jqxh3iKY1YJFSFnCOe7FDKLPIcvutV2JACUCsmrZrV0Du/+TxUsF Uzx9HD352GeOCVHkAyWoMoTLPhab0tvTYO6YIvGZxuYBDFofZCBtl9KomynVgLOK2Na3 UDRw== X-Gm-Message-State: APt69E26R216EktYDMgA5bVKDSBUfGfNCZlURe3QFrRpaGElR6ISaHSM pJpyqbNUgyBqBNGGNY66ED8VuQ== X-Google-Smtp-Source: ADUXVKKRnJ9Gk0kgCnN6cYyGKDHgYgXNe0T14qQKxRV8CwFFdH9sR7MFPmLDdIEuYR4KNESFkq18VQ== X-Received: by 2002:a50:b2e1:: with SMTP id p88-v6mr12639645edd.297.1529958261375; Mon, 25 Jun 2018 13:24:21 -0700 (PDT) Received: from Mindship-03 (ip5653397a.direct-adsl.nl. [86.83.57.122]) by smtp.gmail.com with ESMTPSA id j43-v6sm69919eda.26.2018.06.25.13.24.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Jun 2018 13:24:20 -0700 (PDT) Date: Mon, 25 Jun 2018 22:24:15 +0200 From: Jouke Witteveen To: hostap@lists.infradead.org Subject: [PATCH] Show [UTF-8] flag if the SSID is reported as UTF-8 Message-ID: <20180625202415.GA3982@Mindship-03> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.0 (2018-05-17) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180625_132433_733633_D8EA5590 X-CRM114-Status: GOOD ( 12.19 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (j.witteveen[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 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 Signed-off-by: Jouke Witteveen --- I am not sure what decides which flags to show. This might be useful information for scripts that process SSIDs. However, I found that in my environment, no APs appear to actually set the UTF-8 field. Regards, - Jouke wpa_supplicant/ctrl_iface.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index fe39c25b7..8a922df47 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -2879,6 +2879,13 @@ static int wpa_supplicant_ctrl_iface_scan_result( return -1; pos += ret; } + ie = wpa_bss_get_ie(bss, WLAN_EID_EXT_CAPAB); + if (ie && ie[1] >= 6 && ie[8] & BIT(1)) { /* Bit 48 - UTF-8 SSID */ + ret = os_snprintf(pos, end - pos, "[UTF-8]"); + if (os_snprintf_error(end - pos, ret)) + return -1; + pos += ret; + } #ifdef CONFIG_HS20 if (wpa_bss_get_vendor_ie(bss, HS20_IE_VENDOR_TYPE) && ie2) { ret = os_snprintf(pos, end - pos, "[HS20]");