From patchwork Fri Dec 6 22:27:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wang X-Patchwork-Id: 1210080 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=chromium.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iu5ZY4pf"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="ViJTZLKP"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47bpj24Zxjz9sPK for ; Mon, 16 Dec 2019 15:49:42 +1100 (AEDT) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9U/eIUlod0HWrYxma+Pj/j1zKaqUTHYSZvBKpT/8C5U=; b=iu5ZY4pfmW02dn IRNZngPDhWWXSxS3J0IJ7pOL/BoYKJGi/J1qUvAuqdcJyRStMT23k8yDOS3Is2yl6mpIKvGwCGxgI bm55z2/sCfnwSTIrKYhwNQPZyZcNSRTRkIVtSHUkDLHyLdXW7xsiSh0xh+VwI2ARFp3HTMNB1wAqw G4yO9bHBEhoSW74lQUrtPlldS8piN9obYkNE7hytAHinAvJ+tc/DS4Y5a7IP+bhzWuELHzn3lFF1W BaxNJ41XSKBLlzH9LmoR9CPSPSQHO6+dhiMLfOxPTyR4OXyGQy1Dd0uTeKQtU9678WX9xG3Uop2R2 TBYff5Zp8LEKSx1BjtBA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1igiKA-00010e-1A; Mon, 16 Dec 2019 04:49:38 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1idM50-00072x-13 for hostap@lists.infradead.org; Fri, 06 Dec 2019 22:28:07 +0000 Received: by mail-pf1-x435.google.com with SMTP id 2so4065481pfx.6 for ; Fri, 06 Dec 2019 14:28:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kCMVd/t+k/x1mWCiozFKcypNrnGdA2QSYE/93wslnpA=; b=ViJTZLKPvxaMqZ+i4YNDZf7dg3CMT5ACNGKuCqbQPAECailz0Ne4sKMzuq8V6yomYD dm070Z8rnMSQLMnm6vlj+5Bg1qk1v+6ylV744ChCe0lZTdOjoIjKAbGEElmILEu1J5Ik XgRUTibK/HqLF5JqKu4enhOaEfvc0VAk63/1s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kCMVd/t+k/x1mWCiozFKcypNrnGdA2QSYE/93wslnpA=; b=Q9jgnXcZVlRQ1oh5A8PyFUlPFgt/0vxx3zWz3T0CZD17UAvavlWzPeuq3v5qAuJebF u+d11He9jMzhAZwRCXKbQCw7oxialYKfQzjuYFAhG2sjQa3cr7LhRMvwH3Tr0ifpr9yr HPbVJipUjKCoyL7C7IheTqV0pTeIizOULE93+rWN7jCIRCGI99iJ2aeiDyAUYz7scm/b Jq5brR7UKJMniknzkkYo3kz+bFuxOQTS8hQdBwSjDIMECA/s0Aj0PYJo+sjl+ad9RT0/ 4wbx1/y3WCQS5zV+zzrry96e1izUnOuI6a3Cp3beN8aq9DQBqfqaRI5tnBDo9jZ943kS eyXg== X-Gm-Message-State: APjAAAUPn6VfN2MMuL0K43wYeqk2Z6f6C8ppPFKmepqo2K9CcWF3zkAO wqHyJ/LvuDXj43BudNAQB9WYBQ== X-Google-Smtp-Source: APXvYqxwX8zTfL/PHFZqCmxY4QVHXMycpmCS2ICBmohit8MxQ+JR9LvgUhK3zKGFTAcCjnnusUrrSg== X-Received: by 2002:a63:646:: with SMTP id 67mr6141963pgg.150.1575671285113; Fri, 06 Dec 2019 14:28:05 -0800 (PST) Received: from localhost ([2620:15c:202:201:2b10:8627:31e7:c5ec]) by smtp.gmail.com with ESMTPSA id a6sm15733185pgg.25.2019.12.06.14.28.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Dec 2019 14:28:04 -0800 (PST) From: Matthew Wang To: j@w1.fi Subject: [PATCH 2/5] wpa_supplicant: Bump up logging level for blacklist decisions Date: Fri, 6 Dec 2019 14:27:45 -0800 Message-Id: <20191206222748.153534-2-matthewmwang@chromium.org> X-Mailer: git-send-email 2.24.0.393.g34dc348eaf-goog In-Reply-To: <20191206222748.153534-1-matthewmwang@chromium.org> References: <20191206222748.153534-1-matthewmwang@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191206_142806_070067_CF07DF75 X-CRM114-Status: GOOD ( 10.49 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:435 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 -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.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-Mailman-Approved-At: Sun, 15 Dec 2019 20:49:36 -0800 X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: briannorris@chromium.org, hostap@lists.infradead.org, matthewmwang@chromium.org, Kirtika Ruchandani Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Kirtika Ruchandani Chrome OS relies on its connection manager, shill, to bump up the logging level in wpa_supplicant during 'interesting' times via its WiFi::SetConnectionDebugging method. The method sets wpa_supplicant debug level to 'info' (quieter) or 'debug' (verbose). It's not clear SetConnectionDebugging is being called on execution paths of interest - in particular, APs we are connected to at one instant show up as blacklisted in the scan after an unexpected disconnect, like so: (<> implies redacted/placeholder) wlan0: New scan results available (own=1 ext=0) wlan0: Radio work 'scan'@<> done in <> seconds wlan0: Selecting BSS from priority group <> // This SSID was one we were connected to before, and there was // no mention of blacklisting it in the log lines prior to this. wlan0: 0: <> ssid='<>' wpa_ie_len=0 rsn_ie_len=<> caps=<> level=<> freq=<> wps wlan0: skip - blacklisted (count=2 limit=0) wlan0: 1: <> ssid='<>' wpa_ie_len=0 rsn_ie_len=<> caps=<> level=<> freq=<> wps Ensure that we always print blacklist adding/clearing decisions - its only 3 lines anyways. Signed-off-by: Kirtika Ruchandani --- wpa_supplicant/blacklist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/blacklist.c b/wpa_supplicant/blacklist.c index e53dc38b3..da9259ce0 100644 --- a/wpa_supplicant/blacklist.c +++ b/wpa_supplicant/blacklist.c @@ -63,7 +63,7 @@ int wpa_blacklist_add(struct wpa_supplicant *wpa_s, const u8 *bssid) e = wpa_blacklist_get(wpa_s, bssid); if (e) { e->count++; - wpa_printf(MSG_DEBUG, "BSSID " MACSTR " blacklist count " + wpa_printf(MSG_INFO, "BSSID " MACSTR " blacklist count " "incremented to %d", MAC2STR(bssid), e->count); return e->count; @@ -104,7 +104,7 @@ int wpa_blacklist_del(struct wpa_supplicant *wpa_s, const u8 *bssid) } else { prev->next = e->next; } - wpa_printf(MSG_DEBUG, "Removed BSSID " MACSTR " from " + wpa_printf(MSG_INFO, "Removed BSSID " MACSTR " from " "blacklist", MAC2STR(bssid)); os_free(e); return 0; @@ -132,7 +132,7 @@ void wpa_blacklist_clear(struct wpa_supplicant *wpa_s) max_count = e->count; prev = e; e = e->next; - wpa_printf(MSG_DEBUG, "Removed BSSID " MACSTR " from " + wpa_printf(MSG_INFO, "Removed BSSID " MACSTR " from " "blacklist (clear)", MAC2STR(prev->bssid)); os_free(prev); }