From: Nick Porter Date: Fri, 12 Apr 2024 11:09:33 +0000 (+0100) Subject: Move sql module call to accounting sections X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f77e058b8002d17d3062cc3093a035a0dedfd7bf;p=thirdparty%2Ffreeradius-server.git Move sql module call to accounting sections --- diff --git a/raddb/sites-available/default b/raddb/sites-available/default index 954c724598e..a2a1d1d1888 100644 --- a/raddb/sites-available/default +++ b/raddb/sites-available/default @@ -1335,6 +1335,13 @@ recv Accounting-Request { # Session start # accounting Start { + # + # Log traffic to an SQL database. + # + # See "Accounting Queries" in `mods-available/sql`. + # + -sql + # # Refresh leases when we see a start. # @@ -1349,6 +1356,26 @@ accounting Start { # Session stop # accounting Stop { + # + # Log traffic to an SQL database. + # + -sql + + # + # If you receive stop packets with zero session length, + # they will NOT be logged in the database. The SQL + # module will print a message (only in debugging mode), + # and will return "noop". + # + # You can ignore these packets by uncommenting the + # following three lines. Otherwise, the server will not + # respond to the accounting request, and the NAS will + # retransmit. + # +# if (noop) { +# ok +# } + # # Return an address to the IP Pool when we see a stop record. # @@ -1359,6 +1386,11 @@ accounting Stop { # Session is still alive # accounting Interim-Update { + # + # Log traffic to an SQL database. + # + -sql + # # Refresh leases when we see an alive. # @@ -1369,6 +1401,11 @@ accounting Interim-Update { # The NAS has just booted up. # accounting Accounting-On { + # + # Record that the NAS has booted to an SQL database + # + -sql + # # Return all addresses related to this NAS to the IP Pool # @@ -1379,6 +1416,11 @@ accounting Accounting-On { # The NAS is about to go down # accounting Accounting-Off { + # + # Record that the NAS is shutting down to an SQL database + # + -sql + # # Return all addresses related to this NAS to the IP Pool # @@ -1450,28 +1492,6 @@ send Accounting-Response { # radutmp # sradutmp - # - # Log traffic to an SQL database. - # - # See "Accounting Queries" in `mods-available/sql`. - # - -sql - - # - # If you receive stop packets with zero session length, - # they will NOT be logged in the database. The SQL - # module will print a message (only in debugging mode), - # and will return "noop". - # - # You can ignore these packets by uncommenting the - # following three lines. Otherwise, the server will not - # respond to the accounting request, and the NAS will - # retransmit. - # -# if (noop) { -# ok -# } - # # Instead of sending the query to the SQL server in # real-time, write it into a log file to be picked up and