aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2013-07-01 10:52:35 +0000
committerJo-Philipp Wich <jow@openwrt.org>2013-07-01 10:52:35 +0000
commit17a7b9cb506ed861d9589a3a8c34c6a430b06d5a (patch)
tree018ea838513e48373940daa0ec9ebc4c13a10f7e /package/network/services/hostapd/files
parent573f9156dcf034c03927c1f8f749ca22a12d0794 (diff)
downloadmaster-187ad058-17a7b9cb506ed861d9589a3a8c34c6a430b06d5a.tar.gz
master-187ad058-17a7b9cb506ed861d9589a3a8c34c6a430b06d5a.tar.bz2
master-187ad058-17a7b9cb506ed861d9589a3a8c34c6a430b06d5a.zip
hostapd: truncate default mac file before adding entries to it (#13797)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37114 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd/files')
-rw-r--r--package/network/services/hostapd/files/hostapd.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 8d6f30538d..94f75c1c95 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -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