Browse Source

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>
Jouni Malinen 9 years ago
parent
commit
f4843c2645
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/fst/fst_ctrl_iface.c

+ 2 - 2
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;