25 Jun
2025
25 Jun
'25
5:30 a.m.
On 25/06/2025 10:22, tach yon wrote:
if (number of Framed-IP-Address attributes > 1) {
You want to use the [#] suffix to get the number of instances of an attribute - so if (&reply:Framed-IP-Address[#] > 1) { ....
update control { # Save the first Framed-IP-Address to a temporary String (because I read ipaddr type isn't available). &Tmp-String-0 := &reply:Framed-IP-Address[0]
Why use Tmp-String-0 - just use Tmp-IP-Address-0 to keep the data type consistent - then there won't be any casting issues. Of, since you're putting the result you want in the control list, you can just use Framed-IP-Address- so update control { &Framed-IP-Address := &reply:Framed-IP-Address[0] } -- Nick Porter