From patchwork Sat Apr 11 10:42:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannu Nyman X-Patchwork-Id: 460353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6EBCF14011D for ; Sat, 11 Apr 2015 20:42:46 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A31F128C7A4; Sat, 11 Apr 2015 12:41:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A860A28C7A4 for ; Sat, 11 Apr 2015 12:41:30 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .iki. - helo: .filtteri6.pp.htv. - helo-domain: .htv.) FROM/MX_MATCHES_NOT_HELO(DOMAIN)=1; rate: -5.5 Received: from filtteri6.pp.htv.fi (filtteri6.pp.htv.fi [213.243.153.189]) by arrakis.dune.hu (Postfix) with ESMTP for ; Sat, 11 Apr 2015 12:41:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filtteri6.pp.htv.fi (Postfix) with ESMTP id 9CC5156F70D for ; Sat, 11 Apr 2015 13:42:16 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri6.pp.htv.fi [213.243.153.189]) (amavisd-new, port 10024) with ESMTP id g1nrUtaENrIk for ; Sat, 11 Apr 2015 13:42:12 +0300 (EEST) Received: from [192.168.1.180] (87-92-23-160.bb.dnainternet.fi [87.92.23.160]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp4.welho.com (Postfix) with ESMTPS id 9D0ED5BC011 for ; Sat, 11 Apr 2015 13:42:12 +0300 (EEST) From: Hannu Nyman To: OpenWrt Development List message-id: <5528FA83.5060509@iki.fi> Date: Sat, 11 Apr 2015 13:42:11 +0300 user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Thunderbird/39.0a2 mime-version: 1.0 Subject: [OpenWrt-Devel] [PATCH 2/2] bug #19345 netifd: radio0: sh: bad number / hostapd X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Two errors "netifd: radio0: sh: bad number" have recently surfaced in system log in trunk when wifi interfaces come up. I tracked the errors to checking numerical values of some config options without ensuring that the option has any value. The errors I see have apparently been introduced by r45051 (ieee80211r in hostapd) and r45326 (start_disabled in mac80211). My patches fix two instances of "bad number", but there may be a third one, as the original report in bug 19345 pre-dates r45326 and already has two "bad number" errors for radio0. https://dev.openwrt.org/ticket/19345 Signed-off-by: Hannu Nyman Index: package/network/services/hostapd/files/netifd.sh =================================================================== --- package/network/services/hostapd/files/netifd.sh (revision 45369) +++ package/network/services/hostapd/files/netifd.sh (working copy) @@ -346,6 +350,7 @@ if [ "$wpa" -ge "1" ]; then json_get_vars nasid ieee80211r + set_default ieee80211r 0 [ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N" if [ "$ieee80211r" -gt "0" ]; then