From: Alan T. DeKok Date: Wed, 14 Jun 2023 01:46:49 +0000 (-0400) Subject: add mod_priority_set(), as with all of the other listeners X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b11743b5f998d6d0ddb6777fd52894f66edce4df;p=thirdparty%2Ffreeradius-server.git add mod_priority_set(), as with all of the other listeners 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) --- diff --git a/src/listen/detail/proto_detail.c b/src/listen/detail/proto_detail.c index 1f3d8e896e6..23f688df217 100644 --- a/src/listen/detail/proto_detail.c +++ b/src/listen/detail/proto_detail.c @@ -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 };