Data convertion and pre-defined variables for Dhcp site.

CpServiceSPb cpservicespb at gmail.com
Sun Jun 9 16:15:00 CEST 2019


I try to set up Dhcp Option 120 - freeradius DHCP-SIP-Servers-DHCP-Option
and Dhcp Option 43 - DHCP-Vendor using unlang, both are octet type.
But is still faulted.
I looked into a lot of docs but didn' t find any success resolution.
So, how is the best way at unlang to:
- convert ipaddr type to octet;
- convert string to octet;
- convert string to ipaddr ?

I tried to use %{hex:192.168.0.254} and %{ipaddr: 192.168.0.254} but there
is nothing.
Also, I investigate that %{listen:src_ipaddr} is possible to use as some of
pre-defined variable with Dcp IP.
But its type is string.
Also I tried %{hex: :%{listen:src_ipaddr}} and
%{ipaddr:%{listen:src_ipaddr}} , there is no positive result.
So, is there predefined variables, providing for example IP of Dhcp which I
can use anywhere instead of specifying of 192.168.0.254 directly ?
For example &DHCP-Domain-Name-Server += %{ipaddr:&some_variable}


More information about the Freeradius-Users mailing list