Skip to content

260713

Choose a tag to compare

@YYH2913 YYH2913 released this 12 Jul 19:27
· 653 commits to main since this release
hostapd: avoid bogus ENFILE with use_existing

OpenWrt may pre-create AP netdevs before hostapd reaches the nl80211 interface creation path.

When use_existing is enabled and the target interface already exists, the current code still tries NL80211_CMD_NEW_INTERFACE first. That produces a misleading ENFILE/"Too many open files in system" message before hostapd falls back to reusing the existing interface.

Short-circuit the create path in that case and directly reuse the existing interface.

This matches the misleading ENFILE symptom reported in openwrt/openwrt#20387.

Signed-off-by: Yanghan Ye <yyh94306@gmail.com>