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
4a83d4b686
('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>
This commit is contained in:
parent
5b9f46df0e
commit
dca4b503f1
1 changed files with 3 additions and 4 deletions
|
@ -277,11 +277,10 @@ int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
|
||||||
non_pref_chan ? non_pref_chan : "N/A");
|
non_pref_chan ? non_pref_chan : "N/A");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The shortest channel configuration is 10 characters - commas, 3
|
* The shortest channel configuration is 7 characters - 3 colons and
|
||||||
* colons, and 4 values that one of them (oper_class) is 2 digits or
|
* 4 values.
|
||||||
* more.
|
|
||||||
*/
|
*/
|
||||||
if (!non_pref_chan || os_strlen(non_pref_chan) < 10)
|
if (!non_pref_chan || os_strlen(non_pref_chan) < 7)
|
||||||
goto update;
|
goto update;
|
||||||
|
|
||||||
cmd = os_strdup(non_pref_chan);
|
cmd = os_strdup(non_pref_chan);
|
||||||
|
|
Loading…
Reference in a new issue