Skip to content
Snippets Groups Projects
Commit 3ee76708 authored by Daniel Golle's avatar Daniel Golle
Browse files

mac80211: don't call md5sum on non-existing file


If no AP is configured, hostapd-${phy}.conf is not being created,
hence md5sum fails and causes log pollution:

netifd: radio1 (3183): md5sum: can't open '/var/run/hostapd-phy1.conf': No such file or directoy

Hence make sure the file exists when calling md5sum.

Fixes: a5bc9787 ("mac80211: add support for dynamically reconfiguring wifi")
Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
parent 24b97579
No related branches found
No related tags found
No related merge requests found
......@@ -925,7 +925,7 @@ drv_mac80211_setup() {
for_each_interface "sta adhoc mesh monitor" mac80211_prepare_vif
NEWAPLIST=
for_each_interface "ap" mac80211_prepare_vif
NEW_MD5=$(md5sum ${hostapd_conf_file})
NEW_MD5=$(test -e "${hostapd_conf_file}" && md5sum ${hostapd_conf_file})
OLD_MD5=$(uci -q -P /var/state get wireless._${phy}.md5)
if [ "${NEWAPLIST}" != "${OLDAPLIST}" ]; then
mac80211_vap_cleanup hostapd "${OLDAPLIST}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment