From: Alan T. DeKok Date: Thu, 15 May 2025 09:31:20 +0000 (-0400) Subject: tweaks for v4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f02a5a3aea283c9ad01198db28db58e4eee4b7bd;p=thirdparty%2Ffreeradius-server.git tweaks for v4 --- diff --git a/doc/antora/modules/howto/pages/protocols/dhcp/policy_common_options.adoc b/doc/antora/modules/howto/pages/protocols/dhcp/policy_common_options.adoc index ad43df97d17..d044076ee8d 100644 --- a/doc/antora/modules/howto/pages/protocols/dhcp/policy_common_options.adoc +++ b/doc/antora/modules/howto/pages/protocols/dhcp/policy_common_options.adoc @@ -30,27 +30,20 @@ applicable to all clients in this policy. [source,unlang] ---- dhcp_common { - reply.Domain-Name-Server := 8.8.8.8 - reply += { Domain-Name-Server = 8.8.4.4 } - reply.Subnet-Mask = 255.255.255.0 - reply.Router-Address = 192.0.2.1 - ... + reply = { + Domain-Name-Server = { 8.8.8.8, 8.8.4.4 } + Subnet-Mask = 255.255.255.0 + Router-Address = 192.0.2.1 + ... + } } ---- -FreeRADIUS has four main operators for assigning values to attributes: +See the xref:unlang/edit.adoc[edit] documentation for instructions on +creating and editing attributes. -`=`:: Add the attribute to the list, if and only if an attribute of the same - name is not already present in that list. -`:=`:: Add the attribute to the list. If any attribute of the same name is - already present in that list it is replaced with the new one. -`+=`:: Add the attribute to the tail of the list, even if attributes of the - same name are already present in the list. -`^=`:: Add the attribute to the head of the list, even if attributes of the - same name are already present in the list. - -These operators allow for attributes to be set to default values and then -overwritten, e.g. setting a default lease time, but then overwriting it for +These edit operation allow for attributes to be set to default values and then +overwritten, e.g. setting a default lease time, but then later overwriting it for a particular group of clients. Attributes in the `control` list are not returned in the DHCP reply packets diff --git a/doc/antora/modules/howto/pages/protocols/dhcp/policy_device_options.adoc b/doc/antora/modules/howto/pages/protocols/dhcp/policy_device_options.adoc index 9ec67662140..9ddff4c6b6c 100644 --- a/doc/antora/modules/howto/pages/protocols/dhcp/policy_device_options.adoc +++ b/doc/antora/modules/howto/pages/protocols/dhcp/policy_device_options.adoc @@ -44,6 +44,9 @@ subclass "pxeclient" "iPXE" { } ---- +See also the xref:raddb/mods-available/isc_dhcp.adoc[isc_dhcp] module, +which can read a subset of the ISC DHCP configuration files. + Or the equivalent Kea configuration: [source,isckea] @@ -78,7 +81,7 @@ above: [source,unlang] ---- -if (User-Class && %substring(User-Class, 0, 4) == 'iPXE') { +if (User-Class && %str.subst(User-Class, 0, 4) == 'iPXE') { reply.Boot-Filename := 'http://my.web.server/boot_script.php' } else { reply.Boot-Filename := 'undionly.kpxe'