diff options
author | Ashwini Patil <c_apati@qti.qualcomm.com> | 2017-02-24 08:01:54 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2017-02-26 10:26:22 (GMT) |
commit | dca4b503f13500f5dfd1e56d440622ceb0ee2660 (patch) | |
tree | 7cba96ebad9a3e4725374fe3466c972601918e07 /wpa_supplicant/mbo.c | |
parent | 5b9f46df0e19111a64c6036df59076f879777988 (diff) | |
download | hostap-dca4b503f13500f5dfd1e56d440622ceb0ee2660.zip hostap-dca4b503f13500f5dfd1e56d440622ceb0ee2660.tar.gz hostap-dca4b503f13500f5dfd1e56d440622ceb0ee2660.tar.bz2 |
MBO: Fix minimum length check on non_pref_chan configuration
The reason detail field in non_pref_chan attribute was removed
from MBO draft v0.0_r25. Also oper_class can be 1 character for
few country codes (e.g., country code-UK, channel number-1). So the
shortest channel configuration is 7 characters.
This was missed in the earlier commit
4a83d4b6861f6627b6b256b8c126547a19409a70 ('MBO: Do not add reason_detail
in non_pref_chan attr (STA)') that took care of other changes related to
removal of the reason detail.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/mbo.c')
-rw-r--r-- | wpa_supplicant/mbo.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/wpa_supplicant/mbo.c b/wpa_supplicant/mbo.c index d20ae5e..3edfd27 100644 --- a/wpa_supplicant/mbo.c +++ b/wpa_supplicant/mbo.c @@ -277,11 +277,10 @@ int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s, non_pref_chan ? non_pref_chan : "N/A"); /* - * The shortest channel configuration is 10 characters - commas, 3 - * colons, and 4 values that one of them (oper_class) is 2 digits or - * more. + * The shortest channel configuration is 7 characters - 3 colons and + * 4 values. */ - if (!non_pref_chan || os_strlen(non_pref_chan) < 10) + if (!non_pref_chan || os_strlen(non_pref_chan) < 7) goto update; cmd = os_strdup(non_pref_chan); |