Nrsyncd: 802.11k Neighbor Report Sync Daemon

More out of interest than a need for clients to have help on my network, I went to install nrsyncd earlier and found that on startup, it hung for 5 minutes before complaining:

Jan 10 17:19:12 dougal nrsyncd: Waiting for all wireless interfaces to initialize.
Jan 10 17:24:14 dougal nrsyncd: Timeout waiting for hostapd objects (got 4 / expected 5). Check wireless config & hostapd logs.

That turned out to be because I’m using an 802.11s mesh; the init script was finding 5 wifi-iface entries in the wireless config file, but only 4 were reported by uci. Small patch for the init script follows:

diff --git a/service/nrsyncd.init b/service/nrsyncd.init
index 0f0c4c7..4dd704c 100755
--- a/service/nrsyncd.init
+++ b/service/nrsyncd.init
@@ -74,6 +74,8 @@ get_enabled_iface_count() {
        for i in $(seq 0 "$seq_end"); do
                disabled=$(uci -q get "wireless.@wifi-iface[${i}].disabled" 2>/dev/null)
                [ "$disabled" = "1" ] && continue
+               mesh=$(uci -q get "wireless.@wifi-iface[${i}].mode" 2>/dev/null)
+               [ "$mesh" == "mesh" ] && continue
                count=$((count + 1))
        done
        echo "$count"

Feel free to include it or not, @_FailSafe !

3 Likes