aboutsummaryrefslogtreecommitdiffstats
path: root/src/fst
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-07-26 13:28:51 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-26 15:45:13 (GMT)
commitf4843c26451b520351aa485e3bac608c8c1bf405 (patch)
treeadfe3873a56bd12b4c5090092dbc8aa7cb4220d2 /src/fst
parent1ab51fb595232e630d530169237833c7be0763a3 (diff)
downloadhostap-f4843c26451b520351aa485e3bac608c8c1bf405.zip
hostap-f4843c26451b520351aa485e3bac608c8c1bf405.tar.gz
hostap-f4843c26451b520351aa485e3bac608c8c1bf405.tar.bz2
FST: Fix get_peer_mbies interface fetching in multi-group case
The foreach_fst_group() loop needs "break-if-found", not "continue-if-not-found" to do the search iteration properly. If there were multiple groups, the previous design could have failed to find the interface. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/fst')
-rw-r--r--src/fst/fst_ctrl_iface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fst/fst_ctrl_iface.c b/src/fst/fst_ctrl_iface.c
index 76d4776..d090718 100644
--- a/src/fst/fst_ctrl_iface.c
+++ b/src/fst/fst_ctrl_iface.c
@@ -574,8 +574,8 @@ static int get_peer_mbies(const char *params, char *buf, size_t buflen)
foreach_fst_group(g) {
iface = fst_group_get_iface_by_name(g, ifname);
- if (!iface)
- continue;
+ if (iface)
+ break;
}
if (!iface)
goto problem;