diff --git a/src/hotspot.c b/src/hotspot.c index f4044109..3445ce44 100644 --- a/src/hotspot.c +++ b/src/hotspot.c @@ -271,6 +271,24 @@ try_roaming_consortium: return NULL; } +const uint8_t *hs20_get_roaming_consortium(struct network *network, + size_t *len) +{ + struct hs20_config *config; + const uint8_t *rc_ie = network_get_roaming_consortium(network); + + if (!rc_ie) + return NULL; + + config = l_queue_find(hs20_settings, match_rc, rc_ie); + if (config) { + *len = config->rc_len; + return config->rc; + } + + return NULL; +} + static int hotspot_init(void) { DIR *dir; diff --git a/src/hotspot.h b/src/hotspot.h index 21684d32..7ce95156 100644 --- a/src/hotspot.h +++ b/src/hotspot.h @@ -23,3 +23,6 @@ struct network; const char *hs20_find_settings_file(struct network *network); + +const uint8_t *hs20_get_roaming_consortium(struct network *network, + size_t *len);