]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP: Fix Extended Key ID parameter check
authorAlexander Wetzel <alexander@wetzel-home.de>
Mon, 23 Mar 2020 18:42:26 +0000 (19:42 +0100)
committerJouni Malinen <j@w1.fi>
Wed, 25 Mar 2020 22:26:17 +0000 (00:26 +0200)
Check the new variable to be set instead the current setting.

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
hostapd/config_file.c

index d53436751ac5383f97690e050fe344c478fc9fb5..bdae3be79030377ae0f4297d9b73293f5c72b3a9 100644 (file)
@@ -2872,10 +2872,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
        } else if (os_strcmp(buf, "extended_key_id") == 0) {
                int val = atoi(pos);
 
-               if (bss->extended_key_id < 0 || bss->extended_key_id > 2) {
+               if (val < 0 || val > 2) {
                        wpa_printf(MSG_ERROR,
                                   "Line %d: Invalid extended_key_id=%d; allowed range 0..2",
-                                  line, bss->extended_key_id);
+                                  line, val);
                        return 1;
                }
                bss->extended_key_id = val;