]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - src/fst/fst_session.c
FST: Use more robust interface-find for TEST_REQUEST
[thirdparty/hostap.git] / src / fst / fst_session.c
index 7a4d6db9717627f6c3be32f7f984b5c0468f5269..55fa69495e99ad4e07644661d81adfcdcde29f18 100644 (file)
@@ -1328,13 +1328,11 @@ static int get_group_fill_session(struct fst_group **g, struct fst_session *s)
        struct fst_get_peer_ctx *ctx;
 
        os_memset(s, 0, sizeof(*s));
-       *g = dl_list_first(&fst_global_groups_list,
-                          struct fst_group, global_groups_lentry);
-       if (!*g)
-               return -EINVAL;
-
-       s->data.new_iface = dl_list_first(&(*g)->ifaces, struct fst_iface,
-                                         group_lentry);
+       foreach_fst_group(*g) {
+               s->data.new_iface = fst_group_first_iface(*g);
+               if (s->data.new_iface)
+                       break;
+       }
        if (!s->data.new_iface)
                return -EINVAL;