From: Jouni Malinen Date: Sun, 26 Jul 2015 13:28:51 +0000 (+0300) Subject: FST: Fix get_peer_mbies interface fetching in multi-group case X-Git-Tag: hostap_2_5~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4843c26451b520351aa485e3bac608c8c1bf405;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/fst/fst_ctrl_iface.c b/src/fst/fst_ctrl_iface.c index 76d4776b2..d0907188a 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;