Freeradius Module Extension Magic Number mismatch
Hello, Freeradius 3.2.1 is installed from debian packages (standard debian bookworm distribution). I have implemented a new module and added it as an .so. I built the module alongside Freeradius 3.2.1 (from github). When enabling the module, I get the following error: Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Failed loading module rlm_(null) from file /usr/lib/freeradius/rlm_tba.so Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Application and rlm_(null) magic number (prefix) mismatch. application: 0 module: f0 Even if I write the simplest module, I get this issue. The has the following binder. Can you tell me, where the issue is originating from, and how I can get the MAGIC number? I searched and tried out a lot, but at the end, had to implement the functionality as a python script. Getting the radius module running would help me a lot. extern module_t rlm_tba; module_t rlm_tba = { .magic = RADIUSD_MAGIC_NUMBER, .methods = { [MOD_POST_AUTH] = tba_post_auth } }; Regards, Dincer
On Sep 9, 2024, at 11:41 AM, Dincer Beken <dbeken@blackned.de> wrote:
Freeradius 3.2.1 is installed from debian packages (standard debian bookworm distribution). I have implemented a new module and added it as an .so. I built the module alongside Freeradius 3.2.1 (from github).
When enabling the module, I get the following error:
Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Failed loading module rlm_(null) from file /usr/lib/freeradius/rlm_tba.so Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Application and rlm_(null) magic number (prefix) mismatch. application: 0 module: f0 Even if I write the simplest module, I get this issue.
The module API changes occasionally. So instead of having the server crash when something is misconfigured, it checks the magic number and complains.
The has the following binder. Can you tell me, where the issue is originating from, and how I can get the MAGIC number? I searched and tried out a lot, but at the end, had to implement the functionality as a python script. Getting the radius module running would help me a lot.
The magic number is part of the build process. You have to build all of the modules and server core at the same time. i.e. you can't install a version of FreeRADIUS from packages, and then try to add your own module to it. You will get the error you see above. Alan DeKok.
Hello, Probably figured out the issue. Needed to download the sources from apt libraries directly and build them. Now I can get the library running. ________________________________ Von: Freeradius-Users <freeradius-users-bounces+dbeken=blackned.de@lists.freeradius.org> im Auftrag von Dincer Beken <dbeken@blackned.de> Gesendet: Montag, 9. September 2024 17:41 An: freeradius-users@lists.freeradius.org <freeradius-users@lists.freeradius.org> Betreff: [EXTERNAL] Freeradius Module Extension Magic Number mismatch Hello, Freeradius 3.2.1 is installed from debian packages (standard debian bookworm distribution). I have implemented a new module and added it as an .so. I built the module alongside Freeradius 3.2.1 (from github). When enabling the module, I get the following error: Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Failed loading module rlm_(null) from file /usr/lib/freeradius/rlm_tba.so Mon Sep 9 15:29:38 2024 : Error: /etc/freeradius/3.0/mods-enabled/tba[1]: Application and rlm_(null) magic number (prefix) mismatch. application: 0 module: f0 Even if I write the simplest module, I get this issue. The has the following binder. Can you tell me, where the issue is originating from, and how I can get the MAGIC number? I searched and tried out a lot, but at the end, had to implement the functionality as a python script. Getting the radius module running would help me a lot. extern module_t rlm_tba; module_t rlm_tba = { .magic = RADIUSD_MAGIC_NUMBER, .methods = { [MOD_POST_AUTH] = tba_post_auth } }; Regards, Dincer - List info/subscribe/unsubscribe? See https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freeradius.org%2Flist%2Fusers.html&data=05%7C02%7Cdbeken%40blackned.de%7Ca049870550ff4016016f08dcd0e5e212%7C331ade1e93f545288e0bd7e2347088a7%7C0%7C0%7C638614932986286604%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=IvwAt%2Bho03Pcxek%2FIheU01Yc8zLTg6biwQ3FMj8agS8%3D&reserved=0<http://www.freeradius.org/list/users.html>
participants (2)
-
Alan DeKok -
Dincer Beken