Data convertion and pre-defined variables for Dhcp site.

Alan DeKok aland at deployingradius.com
Sun Jun 9 21:38:03 CEST 2019


On Jun 9, 2019, at 1:48 PM, CpServiceSPb <cpservicespb at gmail.com> wrote:
> But option 43 - DHCP-Vendor is octet also. However
> 
> &DHCP-Vendor = "http://user:pass@%{listen:src_ipaddr}/pbx"
> 
> works fine.

  Define "works".

  Hint: it does the same thing as any other "octets" attribute.  It takes the data you give, and dumps it into the attribute.

> I added it
> &DHCP-SIP-Servers-DHCP-Option = "0x01c0a800fe"
> to update section.
> If you talked about it.
> But it would be easy that it is in human readable/clear format.

  That's nice.  Send a patch to fix it.
> Is there string to hex convertion ? Look like
> 
> %{hex:%{listen:str_ipaddr}}  ?

  You don't want string to hex conversion.  Think about it.  You want to covert "192.168.0.254" into a 32-bit IP address, and then convert *that* to hex.

> As I understood, in case of 120 option conversion in particular is
> made automatically, is it ?

  I just said it wasn't made automatically.  What part of that was unclear?

  Alan DeKok.





More information about the Freeradius-Users mailing list