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

Hahn, Maital maitalm
Wed Jul 8 04:26:53 PDT 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