wpa_supplicant: typo in wpa_scan_result_compar() causes wrong scan results sorting (and wrong roaming decision)

Hahn, Maital maitalm at ti.com
Wed Jul 8 07:26:53 EDT 2015


diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1717,7 +1717,7 @@ static int wpa_scan_result_compar(const void *a, const void *b)
                snr_a_full = wa->snr;
                snr_a = MIN(wa->snr, GREAT_SNR);
                snr_b_full = wb->snr;
-               snr_b = MIN(wa->snr, GREAT_SNR);
+               snr_b = MIN(wb->snr, GREAT_SNR);
        } else {
                /* Level is not in dBm, so we can't calculate
                 * SNR. Just use raw level (units unknown). */




More information about the HostAP mailing list