How I can return an error message from module to &request:Module-Failure-Message?
Freeraidius embedded modules can set this attribute &request:Module-Failure-Message += eap: Failed continuing EAP TTLS (21) session. EAP sub-module failed I want to log it in the post_auth section. It is easy, no problem with that. But I also have a custom module. And I want to log errors from it too. If I am not wrong modules can return 2 lists of attribute reply and control (config). So if I want to log error messages from embedded modules and my custom modules I need to check 2 places &request:Module-Failure-Message and $reply:My-Module-Error-message To unify it I think I want to do next // call my module my_module update request { Module-Failure-Message += "%{reply:My-Module-Error-Message}" } Or there is a better way to pass the error message from the custom module to &request:Module-Failure-Message? Or maybe I should never touch this attribute? — Best regards, Vladimir
On 31/08/2022 17:50, work vlpl wrote:
I want to log it in the post_auth section. It is easy, no problem with that. But I also have a custom module. And I want to log errors from it too. If I am not wrong modules can return 2 lists of attribute reply and control (config).
You can update the request list, too.
Or there is a better way to pass the error message from the custom module to &request:Module-Failure-Message? Or maybe I should never touch this attribute?
Just add that attribute directly to the request list. -- Matthew
participants (2)
-
Matthew Newton -
work vlpl