From: Nick Lowe Date: Mon, 25 Jan 2016 10:53:28 +0000 (+0000) Subject: Do not send Acct-Authentic in Accounting-On/Off X-Git-Tag: hostap_2_6~955 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=commitdiff_plain;h=479f46c4c264341550335475e525bc311e75626b Do not send Acct-Authentic in Accounting-On/Off Acct-Authentic is used to indicate how the user was authenticated and as such, should not be sent in Accounting-On and Accounting-Off. Signed-off-by: Nick Lowe --- diff --git a/src/ap/accounting.c b/src/ap/accounting.c index 9b06221..c4aea40 100644 --- a/src/ap/accounting.c +++ b/src/ap/accounting.c @@ -76,17 +76,18 @@ static struct radius_msg * accounting_msg(struct hostapd_data *hapd, goto fail; } - if (!hostapd_config_get_radius_attr(hapd->conf->radius_acct_req_attr, - RADIUS_ATTR_ACCT_AUTHENTIC) && - !radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_AUTHENTIC, - hapd->conf->ieee802_1x ? - RADIUS_ACCT_AUTHENTIC_RADIUS : - RADIUS_ACCT_AUTHENTIC_LOCAL)) { - wpa_printf(MSG_INFO, "Could not add Acct-Authentic"); - goto fail; - } - if (sta) { + if (!hostapd_config_get_radius_attr( + hapd->conf->radius_acct_req_attr, + RADIUS_ATTR_ACCT_AUTHENTIC) && + !radius_msg_add_attr_int32(msg, RADIUS_ATTR_ACCT_AUTHENTIC, + hapd->conf->ieee802_1x ? + RADIUS_ACCT_AUTHENTIC_RADIUS : + RADIUS_ACCT_AUTHENTIC_LOCAL)) { + wpa_printf(MSG_INFO, "Could not add Acct-Authentic"); + goto fail; + } + /* Use 802.1X identity if available */ val = ieee802_1x_get_identity(sta->eapol_sm, &len);