From patchwork Thu Aug 20 10:46:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Koroban X-Patchwork-Id: 1348312 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=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=oktetlabs.ru Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=Rm5iXkfk; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4BXM7L3Ct7z9sPC for ; Thu, 20 Aug 2020 20:57:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:Subject:To:From:Date:MIME-Version: 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=0Q0XidBQecqfKQSZW3BXpAsdyg02Le2ZzFGZeBL767I=; b=Rm5iXkfknXszKi 9RSiIT8/0gGBFna/lO4sh3KAgye3gvBht5rTZosQFWAiFO605HD97aEBKIaotoR2DxoL335fhpucn iIhQjoIXgydyht9DQ+dyqK5aYaWSu6w++ZUySvgSNApAqr05cZt2Bo4ZinsUBiIGM+AUYVVIuwvCJ fzU4oNjTJA8XAwIs5FXBOrJehPZYUGU9ZWsFU8kqK7lYlywKSKyQqqFMjtQOumnspTtEF4hkXuWYR Due6K/XfmIGUlpA4jOVHb3II2PffzRdsN/1CzIxFNi+LZiWIYB0QZab1e+6Vk0rCaWQLMXJlI5fCx hUs0iYEOgIvD4QviVusA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8iFr-0000Tj-R1; Thu, 20 Aug 2020 10:57:11 +0000 Received: from shelob.oktetlabs.ru ([91.220.146.113]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8iFp-0000TK-6P for hostap@lists.infradead.org; Thu, 20 Aug 2020 10:57:10 +0000 Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 250797F66D; Thu, 20 Aug 2020 13:47:01 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD autolearn=no autolearn_force=no version=3.4.2 Received: from oktetlabs.ru (calendar.oktetlabs.ru [192.168.34.50]) by shelob.oktetlabs.ru (Postfix) with ESMTP id D57B07F666 for ; Thu, 20 Aug 2020 13:46:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru D57B07F666 Authentication-Results: shelob.oktetlabs.ru/D57B07F666; dkim=none; dkim-atps=neutral MIME-Version: 1.0 Date: Thu, 20 Aug 2020 13:46:57 +0300 From: Dmitry Koroban To: hostap@lists.infradead.org Subject: [PATCH] Hostapd does not update WPS credentials on SIGHUP Message-ID: X-Sender: dkoroban@oktetlabs.ru User-Agent: Roundcube Webmail/1.3.15 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_065709_388091_7091B1DB X-CRM114-Status: UNSURE ( 8.43 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.8 (+) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 DKIM_ADSP_DISCARD No valid author signature, domain signs all mail and suggests discarding the rest -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Faced this issue on v2.6, but 2.10 seems to have it too. Steps to reproduce: 1. Start hostapd with WPS enabled 2. Change passphrase in hostapd.conf 3. Send SIGHUP to hostapd 4. Try to connect client using wps_pbc 5. Client receives old passphrase and cannot connect Signed-off-by: Dmitry Koroban hapd->conf->iface); } diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index b37f49f9a..9c78785c6 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -163,6 +163,9 @@ static void hostapd_reload_bss(struct hostapd_data *hapd) wpa_printf(MSG_ERROR, "Could not set SSID for kernel driver"); /* try to continue */ } + /* Update WPS credentials */ + hostapd_deinit_wps(hapd); + hostapd_init_wps(hapd, hapd->conf); wpa_printf(MSG_DEBUG, "Reconfigured interface %s",