From owner-freebsd-current@FreeBSD.ORG Tue Nov 18 23:38:42 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0405916A4CE for ; Tue, 18 Nov 2003 23:38:42 -0800 (PST) Received: from ntmk.tagil.ru (ntmk.tagil.ru [195.151.0.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BEE543FCB for ; Tue, 18 Nov 2003 23:38:38 -0800 (PST) (envelope-from boris@ntmk.ru) Received: from ntmk.ru (boris.nikom.ru [10.1.16.195]) by ntmk.tagil.ru (8.9.3/8.9.1) with ESMTP id MAA56634; Wed, 19 Nov 2003 12:38:27 +0500 (YEKT) Message-ID: <3FBB1DF3.1050706@ntmk.ru> Date: Wed, 19 Nov 2003 12:38:27 +0500 From: Boris Kovalenko User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Barney Wolff , freebsd-current References: <3FBAEAC1.7090709@tagnet.ru> <20031119071703.GA38863@pit.databus.com> In-Reply-To: <20031119071703.GA38863@pit.databus.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: ppp RADIUS accounting bug X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2003 07:38:42 -0000 Hello! Yes, unsigned, so we have 4G limit, which may simple be overflowed by (for example) PPPoE connection. Yes, RADIUS standard defines new attributes for big words, but current PPP does not supports it (it, so our knowledge about RFC is useless :) Again, rad_put_int defined u_int32_t parameter, so if a have dowloaded 4.5G (for example) what number will send to radius? Regards, Boris Barney Wolff wrote: >On Wed, Nov 19, 2003 at 09:00:01AM +0500, Boris Kovalenko wrote: > > >> I found a serious bug in RADIUS accounting code. The problem is that >>OctetsIn and OctetsOut are defined as unsingned long long, but the >>RADIUS supports only INT32 values, so, when >>we're doing rad_put_int(r->cx.rad, RAD_ACCT_OUTPUT_OCTETS, >>stats->OctetsOut) in radius.c for OctetsOut (and OctetsIn also) we >>loosing information if OctetsOut is greater then INT32_MAX. This should >>be fixed. >> >> > >Note that RADIUS integers are unsigned, so the limit is 2^32-1. >Also, RFC2869 defines attributes to hold the high-order parts. > > >