[EXT] Convert an integer to a MAC address in unlang / expr

Alan DeKok aland at deployingradius.com
Thu Aug 27 13:21:05 CEST 2020


On Aug 27, 2020, at 6:44 AM, James Wood <james.wood at purplewifi.com> wrote:
> 
> If I just perform the mask transform on the last octet this works but of
> course it returns the result as an int, so I can't find any built in
> function to get that back to hex.

  There's %{hex:...} but it only works on attributes, not raw numbers.

> This is what I've ended up with; please let me know if you feel there is a
> better/cleaner way without needing the IF statement

  After some thinking I don't think there is.  I'll see if I can add some features to make this easier.

  Alan DeKok.




More information about the Freeradius-Users mailing list