[From nobody Thu Jun 25 05:55:57 2020
Received: from challenger4.mydhp.de ([185.84.81.4])
 by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
 id 1jiNy1-0000eP-Do
 for openwrt-devel@lists.openwrt.org; Mon, 08 Jun 2020 20:01:59 +0000
From: Johann Neuhauser &lt;johann@it-neuhauser.de&gt;
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=it-neuhauser.de;
 s=atlas188; t=1591646510;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=WCIkXIlenEo9kAPQ5pbxz51JjTqWyaN3YlMwjmIS9Kk=;
 b=BXG7N02lJo1NjYbLAy8Z4ju5J9IeVqPyAY90iGlLe7zIsk0E430/a6a31Ttb6aGcq5YkI2
 7bzFS5d/KDq0eO1guMAEol7HwPdTGauvb73QbMSQcYB2XcCEWQCpfYiTYFnK2zZ3hu+U0a
 TJytGo5fxVDOjPrDqmwk2dfbHxk32w8=
To: openwrt-devel@lists.openwrt.org
Cc: Johann Neuhauser &lt;johann@it-neuhauser.de&gt;
Subject: [PATCH] hostapd: hostapd_set_psk_file: fix defaut value for mac
Date: Mon,  8 Jun 2020 22:01:47 +0200
Message-Id: &lt;20200608200147.7402-1-johann@it-neuhauser.de&gt;
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20200608_130157_669777_CC25B9CA 
X-CRM114-Status: UNSURE (   8.40  )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.2 (/)
X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary:
 Content analysis details:   (-0.2 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -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_EF          Message has a valid DKIM or DK signature from
 envelope-from domain
 -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

Bringing up of station vlan fails if the optional mac entry isn't set.
The default mac &quot;00:00:00:00:00:00&quot;, which should match all stations,
is mistakenly set to the non used variable &quot;isolate&quot;. This results in
a wrong formatted .psk file which has to be &quot;vlan_id mac key&quot;.

fixes: 5aa2ddd0: hostapd: add support for wifi-station and wifi-vlan sections

Signed-off-by: Johann Neuhauser &lt;johann@it-neuhauser.de&gt;
---
 package/network/services/hostapd/files/hostapd.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index c9c0507120..f4e2aa559c 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -283,7 +283,7 @@ hostapd_set_psk_file() {
 	local vlan_id=&quot;&quot;
 
 	json_get_vars mac vid key
-	set_default isolate &quot;00:00:00:00:00:00&quot;
+	set_default mac &quot;00:00:00:00:00:00&quot;
 	[ -n &quot;$vid&quot; ] &amp;&amp; vlan_id=&quot;vlanid=$vid &quot;
 	echo &quot;${vlan_id} ${mac} ${key}&quot; &gt;&gt; /var/run/hostapd-${ifname}.psk
 }
-- 
2.25.1


]