hostapd: truncate default mac file before adding entries to it (#13797)
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 1 Jul 2013 10:52:35 +0000 (10:52 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 1 Jul 2013 10:52:35 +0000 (10:52 +0000)
SVN-Revision: 37114

package/network/services/hostapd/Makefile
package/network/services/hostapd/files/hostapd.sh

index d3447dfca09b0939e11d598be00b8f92bce97255..e7150396e8e133351d97fa80a15aa1fbd50fe334 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
 PKG_VERSION:=20130630
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_REV:=9e6a321815f924e1e42896538d639e62d7786f6a
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
index 8d6f30538d3fdefb2642a6c0534875e961855c2c..94f75c1c956652eaec14de328f8f635daecc7d04 100644 (file)
@@ -220,7 +220,9 @@ hostapd_set_bss_options() {
        if [ -z "$macfile" ]
        then
                # if no macfile has been specified, fallback to the default name
+               # and truncate file to avoid aggregating entries over time
                macfile="/var/run/hostapd-$ifname.maclist"
+               echo "" > "$macfile"
        else
                if [ -n "$maclist" ]
                then