]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tweaks for v4
authorAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 09:31:20 +0000 (05:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 15 May 2025 09:31:20 +0000 (05:31 -0400)
doc/antora/modules/howto/pages/protocols/dhcp/policy_common_options.adoc
doc/antora/modules/howto/pages/protocols/dhcp/policy_device_options.adoc

index ad43df97d171388f9caefeaf45075bfb54e4bc9a..d044076ee8d6a065ef1a8c24b19fbc0f2ec4ce7e 100644 (file)
@@ -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
index 9ec67662140b916adcf0d18e1b18d3ba158b152f..9ddff4c6b6c0a1791df2e632b153552531e4e097 100644 (file)
@@ -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'