[PATCH 1/3] AP: Fix Extended Key ID parameter check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check the new variable to be set instead the current setting.

Signed-off-by: Alexander Wetzel <alexander@xxxxxxxxxxxxxx>
---

Without running any tests I have just three changes which look odd.
The others also look ok and I'll make some test runs to see how they
play out.

The first issue in this patch looks like you got distracted when
adding "val" and then missed some replacements.

 hostapd/config_file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 2bc0679b5..8b9b43f9c 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -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;
-- 
2.25.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux