Radippool module don't write ippool table.

Wagner Bento wagner at seanet.com.br
Thu Jul 11 22:56:33 CEST 2019


Hello.

i've checking the mysql log and looks like it was updated, but when I check
the table, I see no information.

Freeradius Log looks like ok, no error.

Am I missing something?

rad_recv: Accounting-Request packet from host 10.100.100.53 port 47842,
id=242, length=198
        Service-Type = Framed-User
        Framed-Protocol = PPP
        NAS-Port = 15728902
        NAS-Port-Type = Ethernet
        User-Name = "teste.huawei at itapema"
        Calling-Station-Id = "00:0C:42:EC:99:96"
        Called-Station-Id = "PPP_Server1"
        NAS-Port-Id = "ether2"
        MS-CHAP-Domain = "itapema"
        Acct-Session-Id = "81600106"
        Framed-IP-Address = 100.74.0.4
        Acct-Authentic = RADIUS
        Event-Timestamp = "Apr 10 2019 00:33:26 -03"
        Acct-Status-Type = Start
        NAS-Identifier = "TESTE - RADIUS"
        Acct-Delay-Time = 0
        Mikrotik-Realm = "itapema"
        NAS-IP-Address = 10.100.100.53
# Executing section preacct from file /etc/freeradius/sites-enabled/default
+group preacct {
++[preprocess] = ok
[acct_unique] Hashing 'NAS-Port = 15728902,NAS-Identifier = "TESTE -
RADIUS",NAS-IP-Address = 10.100.100.53,Acct-Session-Id =
"81600106",User-Name = "teste.huawei at itapema"'
[acct_unique] Acct-Unique-Session-ID = "1482487f3806e579".
++[acct_unique] = ok
[suffix] Looking up realm "itapema" for User-Name = "teste.huawei at itapema"
[suffix] No such realm "itapema"
++[suffix] = noop
+} # group preacct = ok
# Executing section accounting from file
/etc/freeradius/sites-enabled/default
+group accounting {
[detail]        expand: %{Packet-Src-IP-Address} -> 10.100.100.53
[detail]        expand:
/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
-> /var/log/freeradius/radacct/10.100.100.53/detail-20190710
[detail]
/var/log/freeradius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d
expands to /var/log/freeradius/radacct/10.100.100.53/detail-20190710
[detail]        expand: %t -> Wed Jul 10 17:00:00 2019
++[detail] = ok
[sql]   expand: %{User-Name} -> teste.huawei at itapema
[sql] sql_set_user escaped user --> 'teste.huawei at itapema'
[sql]   expand: %{Acct-Delay-Time} -> 0
[sql]   expand:            INSERT INTO radacct             (acctsessionid,
   acctuniqueid,     username,              realm,            nasipaddress,
    nasportid,              nasporttype,      acctstarttime,
 acctstoptime,              acctsessiontime,  acctauthentic,
 connectinfo_start,              connectinfo_stop, acctinputoctets,
 acctoutputoctets,              calledstationid,  callingstationid,
acctterminatecause,              servicetype,      framedprotocol,
framedipaddress,              acctstartdelay,   acctstopdelay,
 xascendsessionsvrkey)           VALUES             ('%{Acct-Session-Id}',
'%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',
 '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',
 '%{NAS-Port-Type}', '%S', NULL,              '0', '%{Acct-Authentic}',
'%{Connect-Info}',              '', '0', '0',
 '%{Called-Station-Id}', '%{Calling-Station-Id}', '',
 '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}',
rlm_sql (sql): Reserving sql socket id: 28
rlm_sql (sql): Released sql socket id: 28
++[sql] = ok
rlm_sql (sql): Reserving sql socket id: 27
[sqlippool]     expand: %{User-Name} -> teste.huawei at itapema
[sqlippool] sql_set_user escaped user --> 'teste.huawei at itapema'
[sqlippool]     expand: START TRANSACTION -> START TRANSACTION
[sqlippool]     expand: UPDATE radippool  SET expiry_time = NOW() +
INTERVAL 3600 SECOND  WHERE nasipaddress = '%{NAS-IP-Address}' AND
 pool_key = '%{NAS-IP-Address}-%{NAS-Port}'  AND username = '%{User-Name}'
 AND callingstationid = '%{Calling-Station-Id}'  AND framedipaddress =
'%{Framed-IP-Address}' -> UPDATE radippool  SET expiry_time = NOW() +
INTERVAL 3600 SECOND  WHERE nasipaddress = '10.100.100.53' AND  pool_key =
'10.100.100.53-15728902'  AND username = 'teste.huawei at itapema'  AND
callingstationid = '00:0C:42:EC:99:96'  AND framedipaddress = '100.74.0.4'
[sqlippool]     expand: COMMIT -> COMMIT
rlm_sql (sql): Released sql socket id: 27
++[sqlippool] = ok
++[exec] = noop
[attr_filter.accounting_response]       expand: %{User-Name} ->
teste.huawei at itapema
attr_filter: Matched entry DEFAULT at line 12
++[attr_filter.accounting_response] = updated
+} # group accounting = updated
Sending Accounting-Response of id 242 to 10.100.100.53 port 47842
Finished request 1.
Cleaning up request 1 ID 242 with timestamp +8
Going to the next request
Waking up in 4.8 seconds.
Cleaning up request 0 ID 241 wi

Em qua, 10 de jul de 2019 às 16:30, Alan DeKok <aland at deployingradius.com>
escreveu:

> On Jul 10, 2019, at 9:23 PM, Wagner Bento <wagner at seanet.com.br> wrote:
> >
> > Ok, I wrote wrong, In my case the modules don't updates the IP pool
> table.
> >
> > Wasn't supposed to update radippool table? for example: | my_pool | IP
> > address | nasipaddress | calledstationid | callingstationid |
> expiry_time |
> > username ....
>
>   Read the debug output to see what's going on.  It WILL produce messages
> saying WHEN it updates the table, or WHY it doesn't update the table.
>
>   If the debug log isn't clear, post it here.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list