aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/ctrl.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-19 20:00:10 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-19 20:00:10 (GMT)
commit57f7d03f91d317c512c403ee4d625f3379b524b6 (patch)
treeebd375bfa1a21b8a3dccf6531ff50061d15981a9 /wlantest/ctrl.c
parentfbdd21327e51dce89a8d5b67cb0fb8d1c118d130 (diff)
downloadhostap-57f7d03f91d317c512c403ee4d625f3379b524b6.zip
hostap-57f7d03f91d317c512c403ee4d625f3379b524b6.tar.gz
hostap-57f7d03f91d317c512c403ee4d625f3379b524b6.tar.bz2
wlantest: Do not add new BSS/STA entries based on ctrl commands
Introduce bss_find()/sta_find() as an alternative bss_get()/sta_get() command that do not allocate new BSS/STA entry if no existing entry is found.
Diffstat (limited to 'wlantest/ctrl.c')
-rw-r--r--wlantest/ctrl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/wlantest/ctrl.c b/wlantest/ctrl.c
index 156b000..ac6efe9 100644
--- a/wlantest/ctrl.c
+++ b/wlantest/ctrl.c
@@ -180,7 +180,7 @@ static void ctrl_list_sta(struct wlantest *wt, int sock, u8 *cmd, size_t clen)
return;
}
- bss = bss_get(wt, bssid);
+ bss = bss_find(wt, bssid);
if (bss == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -228,7 +228,7 @@ static void ctrl_clear_sta_counters(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- bss = bss_get(wt, addr);
+ bss = bss_find(wt, addr);
if (bss == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -240,7 +240,7 @@ static void ctrl_clear_sta_counters(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- sta = sta_get(bss, addr);
+ sta = sta_find(bss, addr);
if (sta == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -264,7 +264,7 @@ static void ctrl_clear_bss_counters(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- bss = bss_get(wt, addr);
+ bss = bss_find(wt, addr);
if (bss == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -291,7 +291,7 @@ static void ctrl_get_sta_counter(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- bss = bss_get(wt, addr);
+ bss = bss_find(wt, addr);
if (bss == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -303,7 +303,7 @@ static void ctrl_get_sta_counter(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- sta = sta_get(bss, addr);
+ sta = sta_find(bss, addr);
if (sta == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -345,7 +345,7 @@ static void ctrl_get_bss_counter(struct wlantest *wt, int sock, u8 *cmd,
return;
}
- bss = bss_get(wt, addr);
+ bss = bss_find(wt, addr);
if (bss == NULL) {
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
return;
@@ -614,7 +614,7 @@ static void ctrl_inject(struct wlantest *wt, int sock, u8 *cmd, size_t clen)
return;
}
- bss = bss_get(wt, bssid);
+ bss = bss_find(wt, bssid);
if (bss == NULL) {
wpa_printf(MSG_INFO, "BSS not found for inject command");
ctrl_send_simple(wt, sock, WLANTEST_CTRL_FAILURE);
@@ -629,7 +629,7 @@ static void ctrl_inject(struct wlantest *wt, int sock, u8 *cmd, size_t clen)
return;
} sta = NULL;
} else {
- sta = sta_get(bss, sta_addr);
+ sta = sta_find(bss, sta_addr);
if (sta == NULL) {
wpa_printf(MSG_INFO, "Station not found for inject "
"command");