4 Jun
2014
4 Jun
'14
9:30 p.m.
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. I am using freeradius 2.1.8 Cheers. Simon