]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Move sql module call to accounting sections
authorNick Porter <nick@portercomputing.co.uk>
Fri, 12 Apr 2024 11:09:33 +0000 (12:09 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 12 Apr 2024 11:16:36 +0000 (12:16 +0100)
raddb/sites-available/default

index 954c724598e1b5b75272c2d34de8b18bdac04618..a2a1d1d18882969eaf260fd6ecc6cfc05ffeebec 100644 (file)
@@ -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