berlin-open-wireless-lab / DAWN

Decentralized WiFi Controller
GNU General Public License v2.0
367 stars 63 forks source link

[Bug?] bandwidth_threshold in config is supposedly megabits but compared to kilobits from hostapd #227

Open MGunlogson opened 1 year ago

MGunlogson commented 1 year ago

Hello again!

I think DAWN is comparing megabits in configuration for bandwidth_threshold against kilobits reported by hostapd. I'm getting log messages about not kicking because bandwidth use is 1500 (impossible on my gigabit lan) when limit is at default 6 . DAWN code assumes hostapd is returning megabits, when it seems to be returning kilobits.

The relevant code is here https://github.com/berlin-open-wireless-lab/DAWN/blob/e036905ae3a5d079f899bbe46461fc78b4566349/src/storage/datastorage.c#L569

I'm not sure if hostapd reports client bandwidth differently depending on the wireless driver? I'm running the newest stable OpenWrt (22.03.5) on some E8450's which have MediaTek drivers. With package hostapd-openssl.