* Some protocols don't need them, so it's OK if the
* validation routines don't exist.
*/
- if (dict_dlopen(dict, argv[0]) < 0) {
+ if (require_dl && (dict_dlopen(dict, argv[0]) < 0)) {
error:
talloc_free(dict);
return -1;
}
- if (require_dl && !dict->dl) {
- fr_strerror_printf("Failed to find libfreeradius-%s", argv[0]);
- goto error;
- }
-
/*
* Set the root attribute with the protocol name
*/
* a soft error if they don't exist.
*/
dict->dl = dl_by_name(dict_gctx->dict_loader, module_name, dict, false);
+ if (!dict->dl) {
+ fr_strerror_printf_push("Failed loading dictionary validation library");
+ return -1;
+ }
talloc_free(module_name);
return 0;