Document &Attribute-Name[*]
authorAlan T. DeKok <aland@freeradius.org>
Mon, 24 Nov 2014 20:44:06 +0000 (15:44 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 24 Nov 2014 20:45:06 +0000 (15:45 -0500)
man/man5/unlang.5

index 549bdd0..9fd532f 100644 (file)
@@ -10,7 +10,7 @@
 .RE
 .sp
 ..
-.TH unlang 5 "28 October 2014" "" "FreeRADIUS Processing un-language"
+.TH unlang 5 "24 November 2014" "" "FreeRADIUS Processing un-language"
 .SH NAME
 unlang \- FreeRADIUS Processing un\-language
 .SH DESCRIPTION
@@ -440,7 +440,7 @@ comparison operators are ":=" and "=".
 .RE
 .IP Attribute Comparisons
 .DS
-       (User-Name == "foo")
+       (&User-Name == "foo")
 .DE
 
 Compares the value of the User-Name attribute to the string 'foo', and
@@ -450,7 +450,7 @@ comparison of the two sides of the condition.
 .RE
 .IP Inter-Attribute Comparisons
 .DS
-       (User-Name == &Filter-Id)
+       (&User-Name == &Filter-Id)
 .DE
 
 Compares the value of the User-Name attribute to the contents of the
@@ -465,13 +465,25 @@ to the Filter-Id attribute.  If left off, it means that the User-Name
 attribute is compared to the literal string "Filter-Id".
 
 Where the left-hand side is an attribute, the "&" can be omitted.
-However, it is allowed for completeness.  e.g. The comparison
+However, it is allowed for backwards compatibility.  e.g. The comparison
 "(&User-Name == &Filter-Id)" is equivalent to the example above.
 
 We recommend using attribute references instead of printing
-attributes to a string, via (User-Name == "%{Filter-Id}").
+attributes to a string, e.g. (User-Name == "%{Filter-Id}").
 Attribute references will be faster and more efficient.
 
+The conditions will check only the first occurance of an attribute.
+If there is more than one instance of an attribute, the following
+syntax should be used:
+
+.DS
+       (&Attribute-Name[*] == "foo")
+.DE
+
+Using the "[*]" syntax means that it checks all of the instances of
+the named attribute.  If one attribute matches, the condition
+succeeds.  If none match, the condition fails.
+
 .RE
 .IP Casts
 .DS