]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Add TEST_FAIL() to hostapd_get_aid()
authorJouni Malinen <j@w1.fi>
Tue, 28 Jun 2016 17:44:26 +0000 (20:44 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 28 Jun 2016 17:44:55 +0000 (20:44 +0300)
This allows additional testing coverage for AID unavailability cases.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/ieee802_11.c

index 98601a831a1f01353fe453759e16193172597a03..11f12f9815385902e6e41f2ab465cbd4cd5d4b4b 100644 (file)
@@ -1385,6 +1385,9 @@ int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta)
                return 0;
        }
 
+       if (TEST_FAIL())
+               return -1;
+
        for (i = 0; i < AID_WORDS; i++) {
                if (hapd->sta_aid[i] == (u32) -1)
                        continue;