]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Fix architecture for RxKH loading from a file
authorJouni Malinen <quic_jouni@quicinc.com>
Mon, 22 Jan 2024 19:30:10 +0000 (21:30 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 22 Jan 2024 19:30:10 +0000 (21:30 +0200)
src/ap/ap_config.c is not really supposed to call directly into a
function in hostapd/config_file.c. Furthermore, the wrapper through
ap_config.c did not really have any real value since it just called a
function that is within hostapd/*.c and that wrapper was called from
hostapd/*.c.

Instead of the wrapper, just call the function directly within the
hostapd directory.

Fixes: 392114a17960 ("FT: Add dynamic reload of RxKH definitions from file")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
hostapd/config_file.h
hostapd/ctrl_iface.c
src/ap/ap_config.c
src/ap/ap_config.h

index c98bdb683ba109fd0fcb2776d11edd631383d2c5..9ef6ac82913013ca494333806dcdab9e68d0c600 100644 (file)
@@ -10,6 +10,8 @@
 #define CONFIG_FILE_H
 
 struct hostapd_config * hostapd_config_read(const char *fname);
+int hostapd_config_read_rxkh_file(struct hostapd_bss_config *conf,
+                                 const char *fname);
 int hostapd_set_iface(struct hostapd_config *conf,
                      struct hostapd_bss_config *bss, const char *field,
                      char *value);
index f2f7f0dbd3050afbbd67cac74e1e5dd13dc157be..2ba9856b4f04700bc6110f6c1bfd3d6e01d87db4 100644 (file)
@@ -1530,7 +1530,7 @@ static int hostapd_ctrl_iface_reload_rxkhs(struct hostapd_data *hapd)
 
        hostapd_config_clear_rxkhs(conf);
 
-       err = hostapd_config_setup_rxkhs(conf);
+       err = hostapd_config_read_rxkh_file(conf, conf->rxkh_file);
        if (err < 0) {
                wpa_printf(MSG_ERROR, "Reloading RxKHs failed: %d",
                           err);
index ebf6828d8cbf039012bb44348bcfd24b7eb5ad70..f760e340b57bcf096e1e9c8abed2dc686db25e36 100644 (file)
@@ -702,12 +702,6 @@ void hostapd_config_clear_wpa_psk(struct hostapd_wpa_psk **l)
 
 #ifdef CONFIG_IEEE80211R_AP
 
-int hostapd_config_setup_rxkhs(struct hostapd_bss_config *conf)
-{
-       return hostapd_config_read_rxkh_file(conf, conf->rxkh_file);
-}
-
-
 void hostapd_config_clear_rxkhs(struct hostapd_bss_config *conf)
 {
        struct ft_remote_r0kh *r0kh, *r0kh_prev;
index 8c459bd59ae34518b16846668f35a2db07ff55bf..de02ddafda777c05de10035dddbcdc88282547be 100644 (file)
@@ -1350,10 +1350,7 @@ void hostapd_config_free_radius_attr(struct hostapd_radius_attr *attr);
 void hostapd_config_free_eap_user(struct hostapd_eap_user *user);
 void hostapd_config_free_eap_users(struct hostapd_eap_user *user);
 void hostapd_config_clear_wpa_psk(struct hostapd_wpa_psk **p);
-int hostapd_config_read_rxkh_file(struct hostapd_bss_config *conf,
-                                 const char *fname);
 void hostapd_config_clear_rxkhs(struct hostapd_bss_config *conf);
-int hostapd_config_setup_rxkhs(struct hostapd_bss_config *conf);
 void hostapd_config_free_bss(struct hostapd_bss_config *conf);
 void hostapd_config_free(struct hostapd_config *conf);
 int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries,