• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Freeradius sql acctsessiontime is wrong

Scheduled Pinned Locked Moved Captive Portal
2 Posts 1 Posters 1.2k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    Kababayan
    last edited by Dec 6, 2013, 7:55 AM Dec 6, 2013, 7:42 AM

    Hi all
    From time to time I got some wrong accounting in sql radius.radacct acctsessiontime. (stoptime - starttime) does not equal to sessiontime and the value is sooo big 2 bil. My Pfsense is a 32 bit. Here is the SS.

    For regular user without time limit this is okey but to users with time limit its really a problem. have to delete the entries then delete the counter db as well.

    Edit
    My setup is:
    Pfsense is in VM wtih reeradius 2.
    Sql is in the Host of the VM.

    1 Reply Last reply Reply Quote 0
    • K
      Kababayan
      last edited by Dec 6, 2013, 11:40 AM

      NVM its fix as Jimp suggested from this post http://forum.pfsense.org/index.php/topic,57632.msg307926.html#msg307926. I think the Nas is sending wrong time. or its the device (an old nokia cell phone). here is a log when it happen.
      php: rc.prunecaptiveportal: Radius accounting debug: Start: 1386328206 Stop: 1386298766 Session time: -29440
      after fix adding + line in /usr/local/captiveportal/radius_accounting.inc
      **  $session_time = $stop_time - $start_time;

      • $session_time = ($session_time >= 0) ? intval($session_time) : 0;**
        setting it tp zero when unsigned acctsessiontime in sql no have zero. dont know if it is the same in db counters have to test it yet with account having time limit.
      1 Reply Last reply Reply Quote 0
      2 out of 2
      • First post
        2/2
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
        This community forum collects and processes your personal information.
        consent.not_received