From f4843c26451b520351aa485e3bac608c8c1bf405 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 26 Jul 2015 16:28:51 +0300 Subject: [PATCH] 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 --- src/fst/fst_ctrl_iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;