aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/accounting.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-11-04 18:44:24 -0800
committerDmitry Shmidt <dimitrysh@google.com>2013-11-04 18:44:24 -0800
commitcce06667447b5aec83452adb0c15100ada531095 (patch)
treedb6df7284213a7942b7f3adf46afd525f4b2166f /src/ap/accounting.c
parente6c91e4c8125a2e7b31d176a52644aa9cab146f1 (diff)
downloadandroid_external_wpa_supplicant_8-cce06667447b5aec83452adb0c15100ada531095.tar.gz
android_external_wpa_supplicant_8-cce06667447b5aec83452adb0c15100ada531095.tar.bz2
android_external_wpa_supplicant_8-cce06667447b5aec83452adb0c15100ada531095.zip
Cumulative patch from commit d4f1a347ceca31fd9cf14070fd000235d5f4e9c1
d4f1a34 Allow AP mode configuration with VHT enabled on 2.4 GHz bb337dd DFS: Do not use cf1 to override freq for 20 MHz channels 0dfd2c6 Document AP mode startup functions fee947b hostapd: Use correct wpa_printf verbosity level for message 2fe210c hostapd: Fix multi-BSS configuration file parsing regression e4ba031 hostapd: Use start_ctrl_iface() from hostapd_add_iface() bf7f09b Fix AP mode QoS Map configuration to be per-BSS dc036d9 DFS: Convert hostapd_data use to hostapd_iface 2db938e hostapd: Fill in phyname automatically 5ae6449 hostapd: Add ctrl_iface STATUS command afadaff Optimize 40 MHz HT co-ex scan on AP 7d6d737 hostapd: Add AP-ENABLED/DISABLED ctrl_iface events e1c5faf hostapd: Track interface state f0793bf hostapd: Wait for channel list update after country code change ae134e1 hostapd: Add ctrl_iface events for ACS ad08e14 hostapd: Move ctrl_iface initialization to happen earlier c20cb02 hostapd: Remove hostapd_interface_init2() 4a5deb9 hostapd: Simplify interface initialization 186c905 DFS: Add control interface events for various DFS events ddf5517 hostapd: Add control interface test commands for radar detection 884f1a3 nl80211: Verify radar event attributes exist before using them 71cdf6b hostapd: Fix ENABLE failure to not remove interface 18ca733 SAE: Fix group selection 65015b2 Replace unnecessary UTF-8 characters with ASCII versions 61323e7 Convert perror/printf calls to wpa_printf 3f134b4 hostapd: Accept RELOG from global control interface b253e6f hostapd: Use wpa_printf() for hostapd_logger() to stdout c092d83 P2P: Clear pending group formation data on group removal 9100b66 P2P: Debug print reason for specific SSID for scan 2aec4f3 Allow add-BSS operation to re-use existing netdev 5592065 hostapd: Allow a single BSS to be removed from an interface 2e2fff3 hostapd: Allow a single BSS to be added to an interface a1fb569 hostapd: Make hostapd_interface_init_bss() available externally 66936c6 hostapd: Make hostapd_init() available externally 390e489 hostapd: Allow the first BSS in a multi-BSS setup to be removed 834ee56 nl80211: Make wpa_driver_nl80211_data::first_bss pointer 748c0ac nl80211: Fix monitor interface reference counting 08e55eb nl80211: Add a debug print for DEL_BEACON 33b0b33 hostapd: Fix error path in hostapd_add_iface() 770ecdf ACS: Do not get stuck while failing to do a subsequent scan 813d4ba DFS: Add support for multi-BSS 954e71d DFS: Reset cac_started properly 6a398dd DFS: Sanitize channel availability checks 32595da DFS: Fix HT40/VHT calculation 0648c3b hostapd: Add -T Linux tracing option 392e68e Set GTK rekey offload information after initial group key handshake bbc706a nl80211: Add debug prints for NL80211_CMD_SET_STATION 731ca63 Update regulatory change to all virtual interface for the phy 6f2db2f hostapd: Validate configuration parameters on RELOAD command eff0fd1 hostapd: Move generic configuration functions into src/ap 5afaa06 hostapd: Allow per-BSS (vif) configuration files ebd79f0 hostapd: Make hostapd_config::bss array of pointers a781e21 hostapd: Force PSK to be derived again on BSS reload 9f104b0 hostapd: Reuse hostapd_clear_old() for RELOAD command Change-Id: I7fbb26cbd4a2960af66a4373c0e6bbe5390a4940 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/ap/accounting.c')
-rw-r--r--src/ap/accounting.c39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/ap/accounting.c b/src/ap/accounting.c
index 95405313..a1f67f0c 100644
--- a/src/ap/accounting.c
+++ b/src/ap/accounting.c
@@ -44,7 +44,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
msg = radius_msg_new(RADIUS_CODE_ACCOUNTING_REQUEST,
radius_client_get_id(hapd->radius));
if (msg == NULL) {
- printf("Could not create net RADIUS packet\n");
+ wpa_printf(MSG_INFO, "Could not create new RADIUS packet");
return NULL;
}
@@ -55,7 +55,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
sta->acct_session_id_hi, sta->acct_session_id_lo);
if (!radius_msg_add_attr(msg, RADIUS_ATTR_ACCT_SESSION_ID,
(u8 *) buf, os_strlen(buf))) {
- printf("Could not add Acct-Session-Id\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Session-Id");
goto fail;
}
} else {
@@ -64,7 +64,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_STATUS_TYPE,
status_type)) {
- printf("Could not add Acct-Status-Type\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Status-Type");
goto fail;
}
@@ -74,7 +74,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
hapd->conf->ieee802_1x ?
RADIUS_ACCT_AUTHENTIC_RADIUS :
RADIUS_ACCT_AUTHENTIC_LOCAL)) {
- printf("Could not add Acct-Authentic\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Authentic");
goto fail;
}
@@ -99,7 +99,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
if (!radius_msg_add_attr(msg, RADIUS_ATTR_USER_NAME, val,
len)) {
- printf("Could not add User-Name\n");
+ wpa_printf(MSG_INFO, "Could not add User-Name");
goto fail;
}
}
@@ -117,7 +117,7 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd,
if (!radius_msg_add_attr(msg, RADIUS_ATTR_CLASS,
val, len)) {
- printf("Could not add Class\n");
+ wpa_printf(MSG_INFO, "Could not add Class");
goto fail;
}
}
@@ -254,14 +254,14 @@ static void accounting_sta_report(struct hostapd_data *hapd,
stop ? RADIUS_ACCT_STATUS_TYPE_STOP :
RADIUS_ACCT_STATUS_TYPE_INTERIM_UPDATE);
if (!msg) {
- printf("Could not create RADIUS Accounting message\n");
+ wpa_printf(MSG_INFO, "Could not create RADIUS Accounting message");
return;
}
os_get_time(&now);
if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_SESSION_TIME,
now.sec - sta->acct_session_start)) {
- printf("Could not add Acct-Session-Time\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Session-Time");
goto fail;
}
@@ -269,19 +269,19 @@ static void accounting_sta_report(struct hostapd_data *hapd,
if (!radius_msg_add_attr_int32(msg,
RADIUS_ATTR_ACCT_INPUT_PACKETS,
data.rx_packets)) {
- printf("Could not add Acct-Input-Packets\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Input-Packets");
goto fail;
}
if (!radius_msg_add_attr_int32(msg,
RADIUS_ATTR_ACCT_OUTPUT_PACKETS,
data.tx_packets)) {
- printf("Could not add Acct-Output-Packets\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Output-Packets");
goto fail;
}
if (!radius_msg_add_attr_int32(msg,
RADIUS_ATTR_ACCT_INPUT_OCTETS,
data.rx_bytes)) {
- printf("Could not add Acct-Input-Octets\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Input-Octets");
goto fail;
}
gigawords = sta->acct_input_gigawords;
@@ -292,13 +292,13 @@ static void accounting_sta_report(struct hostapd_data *hapd,
!radius_msg_add_attr_int32(
msg, RADIUS_ATTR_ACCT_INPUT_GIGAWORDS,
gigawords)) {
- printf("Could not add Acct-Input-Gigawords\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Input-Gigawords");
goto fail;
}
if (!radius_msg_add_attr_int32(msg,
RADIUS_ATTR_ACCT_OUTPUT_OCTETS,
data.tx_bytes)) {
- printf("Could not add Acct-Output-Octets\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Output-Octets");
goto fail;
}
gigawords = sta->acct_output_gigawords;
@@ -309,14 +309,14 @@ static void accounting_sta_report(struct hostapd_data *hapd,
!radius_msg_add_attr_int32(
msg, RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS,
gigawords)) {
- printf("Could not add Acct-Output-Gigawords\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Output-Gigawords");
goto fail;
}
}
if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_EVENT_TIMESTAMP,
now.sec)) {
- printf("Could not add Event-Timestamp\n");
+ wpa_printf(MSG_INFO, "Could not add Event-Timestamp");
goto fail;
}
@@ -326,7 +326,7 @@ static void accounting_sta_report(struct hostapd_data *hapd,
if (stop && cause &&
!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_TERMINATE_CAUSE,
cause)) {
- printf("Could not add Acct-Terminate-Cause\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Terminate-Cause");
goto fail;
}
@@ -400,13 +400,12 @@ accounting_receive(struct radius_msg *msg, struct radius_msg *req,
void *data)
{
if (radius_msg_get_hdr(msg)->code != RADIUS_CODE_ACCOUNTING_RESPONSE) {
- printf("Unknown RADIUS message code\n");
+ wpa_printf(MSG_INFO, "Unknown RADIUS message code");
return RADIUS_RX_UNKNOWN;
}
if (radius_msg_verify(msg, shared_secret, shared_secret_len, req, 0)) {
- printf("Incoming RADIUS packet did not have correct "
- "Authenticator - dropped\n");
+ wpa_printf(MSG_INFO, "Incoming RADIUS packet did not have correct Authenticator - dropped");
return RADIUS_RX_INVALID_AUTHENTICATOR;
}
@@ -432,7 +431,7 @@ static void accounting_report_state(struct hostapd_data *hapd, int on)
if (!radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_TERMINATE_CAUSE,
RADIUS_ACCT_TERMINATE_CAUSE_NAS_REBOOT))
{
- printf("Could not add Acct-Terminate-Cause\n");
+ wpa_printf(MSG_INFO, "Could not add Acct-Terminate-Cause");
radius_msg_free(msg);
return;
}