Fix the "BSS FIRST.." command

The "BSS FIRST.." command fails when additional parameters (e.g., MASK)
is used since the string comparsion does not take into account the
number of characters. Fix by comparing only 5 characters as in other
commands.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Amar Singhal 2013-02-06 00:28:48 +02:00 committed by Jouni Malinen
parent 5ebe8c8179
commit f330b4b44b

View file

@ -3173,7 +3173,7 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
}
}
}
} else if (os_strcmp(cmd, "FIRST") == 0)
} else if (os_strncmp(cmd, "FIRST", 5) == 0)
bss = dl_list_first(&wpa_s->bss_id, struct wpa_bss, list_id);
else if (os_strncmp(cmd, "ID-", 3) == 0) {
i = atoi(cmd + 3);