]> git.ipfire.org Git - thirdparty/hostap.git/commit
hostapd: Replace UDP ctrl_iface global cookies with per-instance ones
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Sun, 12 Jan 2020 22:02:23 +0000 (23:02 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2020 15:48:34 +0000 (17:48 +0200)
commit4b04223f249ee44b563a051dd8af98011aaaf9fa
tree0e8e84fdceae0bed485a98ca7dcfcc33d2d4b4e0
parent4d14838421eda7a54f3ab051f296af5be5f0f93a
hostapd: Replace UDP ctrl_iface global cookies with per-instance ones

The cookie values for UDP control interface commands was defined as a
static global array. This did not allow multi-BSS test cases to be
executed with UDP control interface. For example, after
    hapd1 = hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
    hapd2 = hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')

hapd1->ping() did not work.

Move those cookie values to per-instance location in struct
hapd_interfaces and struct hostapd_data to fix this.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
hostapd/ctrl_iface.c
src/ap/hostapd.h