diff options
author | Jouni Malinen <j@w1.fi> | 2009-11-28 23:03:20 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2009-11-28 23:03:20 +0200 |
commit | 5843e1c9a6930dcca3ea3837b0b0b0e09e73262f (patch) | |
tree | d0d33d2f165b5c43b338a2a8d6e8b614f4852e33 | |
parent | df1e24aceb7972be015fb1891025166ad94ddec6 (diff) | |
download | external_wpa_supplicant_8_ti-5843e1c9a6930dcca3ea3837b0b0b0e09e73262f.zip external_wpa_supplicant_8_ti-5843e1c9a6930dcca3ea3837b0b0b0e09e73262f.tar.gz external_wpa_supplicant_8_ti-5843e1c9a6930dcca3ea3837b0b0b0e09e73262f.tar.bz2 |
Move acct_interim_interval away from RADIUS client configuration
This is not used at all inside RADIUS client and as such, it belongs
into hostapd configuration.
-rw-r--r-- | hostapd/config.c | 2 | ||||
-rw-r--r-- | hostapd/config.h | 1 | ||||
-rw-r--r-- | hostapd/ieee802_11.c | 3 | ||||
-rw-r--r-- | hostapd/ieee802_1x.c | 2 | ||||
-rw-r--r-- | hostapd/sta_info.c | 2 | ||||
-rw-r--r-- | src/radius/radius_client.h | 7 |
6 files changed, 5 insertions, 12 deletions
diff --git a/hostapd/config.c b/hostapd/config.c index e0061ca..c8c22bb 100644 --- a/hostapd/config.c +++ b/hostapd/config.c @@ -1757,7 +1757,7 @@ struct hostapd_config * hostapd_config_read(const char *fname) bss->radius->retry_primary_interval = atoi(pos); } else if (os_strcmp(buf, "radius_acct_interim_interval") == 0) { - bss->radius->acct_interim_interval = atoi(pos); + bss->acct_interim_interval = atoi(pos); #endif /* CONFIG_NO_RADIUS */ } else if (os_strcmp(buf, "auth_algs") == 0) { bss->auth_algs = atoi(pos); diff --git a/hostapd/config.h b/hostapd/config.h index 2c6e5fe..29b7384 100644 --- a/hostapd/config.h +++ b/hostapd/config.h @@ -167,6 +167,7 @@ struct hostapd_bss_config { struct hostapd_ip_addr own_ip_addr; char *nas_identifier; struct hostapd_radius_servers *radius; + int acct_interim_interval; struct hostapd_ssid ssid; diff --git a/hostapd/ieee802_11.c b/hostapd/ieee802_11.c index 276fd94..75bf62c 100644 --- a/hostapd/ieee802_11.c +++ b/hostapd/ieee802_11.c @@ -601,8 +601,7 @@ static void handle_auth(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt, sta->flags &= ~WLAN_STA_PREAUTH; ieee802_1x_notify_pre_auth(sta->eapol_sm, 0); - if (hapd->conf->radius->acct_interim_interval == 0 && - acct_interim_interval) + if (hapd->conf->acct_interim_interval == 0 && acct_interim_interval) sta->acct_interim_interval = acct_interim_interval; if (res == HOSTAPD_ACL_ACCEPT_TIMEOUT) ap_sta_session_timeout(hapd, sta, session_timeout); diff --git a/hostapd/ieee802_1x.c b/hostapd/ieee802_1x.c index 056b6fb..a6313fd 100644 --- a/hostapd/ieee802_1x.c +++ b/hostapd/ieee802_1x.c @@ -1256,7 +1256,7 @@ ieee802_1x_receive_auth(struct radius_msg *msg, struct radius_msg *req, &termination_action)) termination_action = RADIUS_TERMINATION_ACTION_DEFAULT; - if (hapd->conf->radius->acct_interim_interval == 0 && + if (hapd->conf->acct_interim_interval == 0 && msg->hdr->code == RADIUS_CODE_ACCESS_ACCEPT && radius_msg_get_attr_int32(msg, RADIUS_ATTR_ACCT_INTERIM_INTERVAL, &acct_interim_interval) == 0) { diff --git a/hostapd/sta_info.c b/hostapd/sta_info.c index 70bf716..fe319c5 100644 --- a/hostapd/sta_info.c +++ b/hostapd/sta_info.c @@ -435,7 +435,7 @@ struct sta_info * ap_sta_add(struct hostapd_data *hapd, const u8 *addr) wpa_printf(MSG_ERROR, "malloc failed"); return NULL; } - sta->acct_interim_interval = hapd->conf->radius->acct_interim_interval; + sta->acct_interim_interval = hapd->conf->acct_interim_interval; /* initialize STA info data */ eloop_register_timeout(hapd->conf->ap_max_inactivity, 0, diff --git a/src/radius/radius_client.h b/src/radius/radius_client.h index 096939b..eb81234 100644 --- a/src/radius/radius_client.h +++ b/src/radius/radius_client.h @@ -167,13 +167,6 @@ struct hostapd_radius_servers { int retry_primary_interval; /** - * acct_interim_interval - Interim accounting update interval - * - * This parameter is not used inside RADIUS client code. - */ - int acct_interim_interval; - - /** * msg_dumps - Whether RADIUS message details are shown in stdout */ int msg_dumps; |