]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add mod_priority_set(), as with all of the other listeners
authorAlan T. DeKok <aland@freeradius.org>
Wed, 14 Jun 2023 01:46:49 +0000 (21:46 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 14 Jun 2023 01:53:49 +0000 (21:53 -0400)
because setting the packet priority is a function of the protocol
(i.e. proto_radius), and not of the IO handler (e.g. proto_radius_udp)

src/listen/detail/proto_detail.c

index 1f3d8e896e6c8a0e5b560e8040b26c44e3f3ca7a..23f688df217f5cbe9bef3205beb13d0694ed56d2 100644 (file)
@@ -353,6 +353,17 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8
        return 1;
 }
 
+static int mod_priority_set(void const *instance, UNUSED uint8_t const *buffer, UNUSED size_t buflen)
+{
+       proto_detail_t const *inst = talloc_get_type_abort_const(instance, proto_detail_t);
+
+       /*
+        *      Return the configured priority.
+        */
+       return inst->priority;
+}
+
+
 /** Open listen sockets/connect to external event source
  *
  * @param[in] instance Ctx data for this application.
@@ -594,4 +605,5 @@ fr_app_t proto_detail = {
        .open                   = mod_open,
        .decode                 = mod_decode,
        .encode                 = mod_encode,
+       .priority               = mod_priority_set
 };