On 5 Jun 2014, at 02:30, Simon Allard <Simon.Allard@team.orcon.net.nz> wrote:
A way that doesn't rely on FR being \0 safe is to do something like:
if ("%{hex:ADSL-Agent-Remote-Id}" =~ /^....([0-9a-f]+)$/) { update request { Tmp-Octets-0 := "0x%{1}" } update request { ADSL-Agent-Remote-ID := "%{string:Tmp-Octets-0}" } }
But that's pretty nasty.
Hi Aaran
Thank you for that. You are right, it does look nasty :)
I must have missed a step somewhere, as I am seeing this in the debug when using your ulang code.
++++++? if ("%{hex:ADSL-Agent-Remote-Id}" =~ /^....([0-9a-f]+)$/) WARNING: Unknown module "hex" in string expansion "%"
There doesn't seem to be a hex loadable module.
Hm, your version of freeradius is too old and doesn't have the %{hex:} expansion. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2