]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Virtual server `catch timeout` is now testing `timeout` in `finally`
authorNick Porter <nick@portercomputing.co.uk>
Wed, 21 Jan 2026 14:49:40 +0000 (14:49 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 21 Jan 2026 14:51:39 +0000 (14:51 +0000)
raddb/sites-available/default

index 4f192269a01d897e82aa59f3d3ac3683b45a3bfb..28b75be9dec9313ed7ab8bd8e3909f06a0ded11d 100644 (file)
@@ -1518,38 +1518,24 @@ send Accounting-Response {
 }
 
 #
-#  ## Timeouts
+#  ## Finally
 #
-#  A virtual server can have a `catch timeout` section.  The format and
-#  contents are the same as the normal `catch timeout`.
+#  If a `finally` section is defined, then all packets will be processed
+#  through it.
 #
-#  This section limits the total processing time for a request.  The
-#  values given here should be less than `request.timeout`.
+#  This includes packets whose processing has been stopped due to reaching
+#  `request.timeout`.  Such packets can be detected by testing for the
+#  `timeout` rcode.
 #
-#  When a request reaches `request.timeout`, it is forcibly stopped.
-#  No further processing takes place.
+#  The `finally` section can be used as a common logging section for
+#  all packets, allowing their final state to be captured.
 #
-#  When a request reaches the time specified in this `timeout` section,
-#  all normal processing is stopped.  The `timeout` section is then run.
-#
-#  This configuration allows the server to take action when a request
-#  is taking too long.  For example, it could write a failure message
-#  to a log file.
-#
-#  The `timeout` section can contain any `unlang` keyword, including
-#  `call`, and other `timeout` sections.  If you need to have a
-#  "timeout for the timeout", then just add anoither `timeout` section
-#  inside of this one.
-#
-#  Note that `request.timeout` still applies.  So the timeout value
-#  given here should be less than the value given by
-#  `request.timeout`.
-#
-#
-
-#      catch timeout {
-#              do_logging_here
-#              ...
+#finally {
+#      if (timeout) {
+#              logging relating to timeouts
+#              return
 #      }
-
+#
+#      normal packet logging
+#}
 }