Actions
Bug #11582
closedFreeRADIUS XML-RPC Sync doesn't sync all configuration sections
Status:
Resolved
Priority:
Normal
Assignee:
Viktor Gurov
Category:
FreeRADIUS
Target version:
-
Start date:
03/01/2021
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:
Description
Using the XML-RPC Sync feature of the FreeRADIUS package doesn't sync all configuration sections.
For example:- tab
Usersis correctly synced. - tab
MACsis correctly synced. - tab
NAS / Clientsis correctly synced.
InterfacesSettingsEAP
(I did not test the other tabs.)
I did some digging into the FreeRADIUS package source code, and found the following (some code is omitted):
function freeradius_do_xmlrpc_sync($sync_to_ip, $username, $password, $varsyncport, $varsyncprotocol, $varsynctimeout) {
// [... some omitted code ...]
/* XML will hold the sections to sync. */
$xml = array();
$xml['freeradius'] = $config['installedpackages']['freeradius'];
$xml['freeradiusauthorizedmacs'] = $config['installedpackages']['freeradiusauthorizedmacs'];
$xml['freeradiusclients'] = $config['installedpackages']['freeradiusclients'];
$execcmd = "require_once('/usr/local/pkg/freeradius.inc');\n";
$execcmd .= "freeradius_all_after_XMLRPC_resync();";
// [... some omitted code ...]
}
So the behavior matches the code.This method synchronizes only the sections :
freeradiusfreeradiusauthorizedmacs(which holds settings from theMACstab)freeradiusclients(which holds settings from theNAS / Clientstab)
freeradiuseapconf(which holds settings from theEAPtab)freeradiusinterfaces(which holds settings from theInterfacestab)freeradiusinterfaces(which holds settings from theSettingstab)freeradiussync(this one I understand why it's omitted: in order to avoid a sync loop)
I manually edited the source code to make it sync the missing sections, and it seems to work well (at least, the configuration is well-synced).
It there a reason why these 3 sections (freeradiuseapconf, freeradiusinterfaces, freeradiusinterfaces) are omitted from the synchronization mechanism ?
Files
Actions