diff options
| author | Jouni Malinen <j@w1.fi> | 2015-07-26 18:44:39 +0300 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:19:59 -0600 |
| commit | 1dd8da70c06ef14b720b620e227f60d373d889e2 (patch) | |
| tree | 4a14d6835efb463b3bfc4e86341364709df55467 /src/fst | |
| parent | bae2b9da0dcd36749af1c51c9abedb4149abcd79 (diff) | |
| download | android_external_wpa_supplicant_8-1dd8da70c06ef14b720b620e227f60d373d889e2.tar.gz android_external_wpa_supplicant_8-1dd8da70c06ef14b720b620e227f60d373d889e2.tar.bz2 android_external_wpa_supplicant_8-1dd8da70c06ef14b720b620e227f60d373d889e2.zip | |
FST: Use more robust interface-find for TEST_REQUEST
It is possible for there to be multiple FST groups, so the hardcoded
mechanism of selecting the first one when sending out an event message
may not be sufficient. Get the interface from the caller, if available,
and if not, go through all groups in search of an interface to send the
event on.
Change-Id: I6e001d1032f05c113300615ec19d2b15d1fbb3fb
Signed-off-by: Jouni Malinen <j@w1.fi>
Git-commit: fa95b7c0739481e578b903260892b9bc212bddb2
Git-repo: git://w1.fi/srv/git/hostap.git
CRs-Fixed: 891455
Diffstat (limited to 'src/fst')
| -rw-r--r-- | src/fst/fst_session.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/fst/fst_session.c b/src/fst/fst_session.c index 7a4d6db9..55fa6949 100644 --- a/src/fst/fst_session.c +++ b/src/fst/fst_session.c @@ -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; |
