eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit aeae6abcbb7ef46d13b70da8ea53cb6b2ee67c5f
parent 9dcb6946c505725e79d7d1997161bd9fa15d1fee
Author: James Prestwood <james.prestwood@linux.intel.com>
Date:   Fri, 12 Jul 2019 10:30:27 -0700

network: add roaming consortium IE to network object

This is duplicated when the first scan_bss is added to a network
object that contains the IE. Any future BSS's added will not re-add
the IE. Its assumed that all BSS's under a network will contain the
same roaming consortium OIs.

Diffstat:
Msrc/network.c | 12++++++++++++
Msrc/network.h | 1+
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/network.c b/src/network.c @@ -64,6 +64,7 @@ struct network { struct l_queue *blacklist; /* temporary blacklist for BSS's */ uint8_t hessid[6]; char **nai_realms; + uint8_t *rc_ie; bool update_psk:1; /* Whether PSK should be written to storage */ bool ask_passphrase:1; /* Whether we should force-ask agent */ int rank; @@ -562,6 +563,11 @@ char **network_get_nai_realms(struct network *network) return network->nai_realms; } +const uint8_t *network_get_roaming_consortium(struct network *network) +{ + return network->rc_ie; +} + static inline bool __bss_is_sae(const struct scan_bss *bss, const struct ie_rsn_info *rsn) { @@ -704,6 +710,9 @@ bool network_bss_add(struct network *network, struct scan_bss *bss) if (!util_mem_is_zero(bss->hessid, 6)) memcpy(network->hessid, bss->hessid, 6); + if (bss->rc_ie && !network->rc_ie) + network->rc_ie = l_memdup(bss->rc_ie, bss->rc_ie[1] + 2); + return true; } @@ -1363,6 +1372,9 @@ void network_remove(struct network *network, int reason) if (network->nai_realms) l_strv_free(network->nai_realms); + if (network->rc_ie) + l_free(network->rc_ie); + l_free(network); } diff --git a/src/network.h b/src/network.h @@ -52,6 +52,7 @@ void network_set_hessid(struct network *network, uint8_t *hessid); void network_set_nai_realms(struct network *network, char **realms); uint8_t *network_get_hessid(struct network *network); char **network_get_nai_realms(struct network *network); +const uint8_t *network_get_roaming_consortium(struct network *network); int network_autoconnect(struct network *network, struct scan_bss *bss); void network_connect_failed(struct network *network);