24 Sep
2024
24 Sep
'24
11:28 a.m.
On 24/09/2024 16:22, dominic.stalder@unibe.ch wrote:
One last / simple step is missing; I need to send the MAC address in the format aa:bb:cc:dd:ee:ff instead of aa-bb-cc-dd-ee-ff. We call the function rewrite_calling_station_id in /etc/freeradius/sites-available, but for the REST API call we need it with colon as delimiter?
Is there an easy way to replace chars in strings in unlang / freeradius?
If you always want colons, edit the rewrite_calling_station_id policy to use those rather than hyphens. raddb/policy.d/canonicalization If you want both, just add another local attribute to the dictionary (raddb/dictionary) and then add that in the update section of the policy too. Then use that attribute in your rest call. -- Matthew