On 10.07.2013 05:20, Peter Lambrechtsen wrote:
> In pseudo code it would be something like:
>
> if (length(ADSL-Agent-Remote-Id) > 31) {
>
> update reply {
> strncat(SubscriberID, ADSL-Agent-Remote-Id +
> (strlen(ADSL-Agent-Remote-Id) - 31), 31)
> }
> }
> else {
> update reply {
> SubscriberID := ADSL-Agent-Remote-Id
> }
> }
>
> Where in effect if the string is longer than 31 chars take the right
> most 31 chars and only return that.
if ( ADSL-Agent-Remote-Id =~ /(.{0,31})$/ ) {
update reply {
SubscriberID := "%{1}"
}
}
that should do it.
Olivier
--
Olivier Beytrison
Network & Security Engineer, HES-SO Fribourg
Mail: [email protected]
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html