summaryrefslogtreecommitdiff
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
commit7c197d9f0e7418b53e184f0b1a2112bed525454f (patch)
tree00d774557af00275ffc36342023df1d3f158eb47 /package/network/services/hostapd/files
parent5986a18c16fe7035e1ec5a2474a47d0b13ea9383 (diff)
downloadmtk-20170518-7c197d9f0e7418b53e184f0b1a2112bed525454f.zip
mtk-20170518-7c197d9f0e7418b53e184f0b1a2112bed525454f.tar.gz
mtk-20170518-7c197d9f0e7418b53e184f0b1a2112bed525454f.tar.bz2
hostapd: truncate default mac file before adding entries to it (#13797)
SVN-Revision: 37114
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 8d6f305..94f75c1 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