From patchwork Mon Feb 29 10:10:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 589805 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5EFFD1401C7 for ; Mon, 29 Feb 2016 21:10:47 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaKmd-0003ZB-U8; Mon, 29 Feb 2016 10:10:31 +0000 Received: from mail.w1.fi ([212.71.239.96] helo=li674-96.members.linode.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aaKmc-0002bK-0A for hostap@lists.infradead.org; Mon, 29 Feb 2016 10:10:30 +0000 Received: from jm (87-93-72-73.bb.dnainternet.fi [87.93.72.73]) by li674-96.members.linode.com (Postfix) with ESMTPSA id 1174611560; Mon, 29 Feb 2016 10:10:07 +0000 (UTC) Received: by jm (sSMTP sendmail emulation); Mon, 29 Feb 2016 12:10:07 +0200 Date: Mon, 29 Feb 2016 12:10:07 +0200 From: Jouni Malinen To: Nick Lowe Subject: Re: Acct-Delay-Time missing with RADIUS accounting Message-ID: <20160229101007.GC13646@w1.fi> References: <20160222164717.GB16085@w1.fi> <20160222171932.GA20119@w1.fi> <0113A04F-2F14-4C82-BBB4-786B0A5E9200@deployingradius.com> <20160222205218.GA12037@w1.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160229_021030_245139_0B4E7DA8 X-CRM114-Status: GOOD ( 10.25 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hostap@lists.infradead.org, Alan DeKok Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, Feb 22, 2016 at 09:40:10PM +0000, Nick Lowe wrote: > I am not convinced that an Acct-Delay-Time attribute value should be > anything other than 0 where the contents of the Interim-Update are > refreshed to current information. We can do following for interim updates. Need to think a bit more about Acct-Delay-Time in other accounting messages (with the need to update Identifier and Request Authenticator). [PATCH] RADIUS: Add Acct-Delay-Time 0 to interim accounting updates Since these messages do not use RADIUS client retransmission mechanism anymore, we can indicate zero Acct-Delay-Time to the server. Signed-off-by: Jouni Malinen --- src/ap/accounting.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ap/accounting.c b/src/ap/accounting.c index 010ba05..b400938 100644 --- a/src/ap/accounting.c +++ b/src/ap/accounting.c @@ -332,6 +332,20 @@ static void accounting_sta_report(struct hostapd_data *hapd, } } + if (!stop) { + /* + * Since we do not retry the same message again for interim + * updates, indicate that this specific message has no delay in + * transmission attempts. + */ + if (!radius_msg_add_attr_int32(msg, + RADIUS_ATTR_ACCT_DELAY_TIME, + 0)) { + wpa_printf(MSG_INFO, "Could not add Acct-Delay-Time"); + goto fail; + } + } + if (eloop_terminated()) cause = RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_REBOOT;