Skip to content

Commit d67caa3

Browse files
committed
[#3748] Updated ARM
new file: 3748-option-data-in-classes-without-only-in-additional-list-true-have-unexpected-precedence modified: ../doc/sphinx/arm/classify.rst
1 parent c0d4462 commit d67caa3

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[doc] tmark
2+
Clarified how classes impact option order precedence.
3+
(Gitlab #3748)

doc/sphinx/arm/classify.rst

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,41 @@ The classification process is conducted in several steps:
134134

135135
.. note::
136136

137-
The ``lease4_select``, ``lease4_renew``, ``lease6_select``, ``lease6_renew``, and ``lease6_rebind``
138-
callouts are called here.
137+
The ``lease4_select``, ``lease4_renew``, ``lease6_select``, ``lease6_renew``,
138+
and ``lease6_rebind`` callouts are called here.
139139

140-
12. Classes marked as "additional" are evaluated in the order in which
141-
they are listed: first pools, then the subnet, and finally
142-
the shared network that assigned resources belong to.
140+
12. The ``evaluate-additional-classes`` lists (if any) are evaluated first
141+
for the pool, then the subnet, and the finally shared-network to which the
142+
assigned resources belong. Classes are evaluated in the order they appear
143+
within each list.
143144

144145
13. Options are assigned, again possibly based on the class information
145146
in the order that classes were associated with the incoming packet.
146-
For DHCPv4 private and code 43 options, this includes option
147-
definitions specified within classes.
147+
The first class matched to the packet which specifies a given
148+
option wins. For DHCPv4 private and code 43 options, this includes
149+
option definitions specified within classes. The order of precedence
150+
for options is as follows:
151+
152+
1. Host options
153+
2. Pool options
154+
3. Subnet options
155+
4. Shared network options
156+
5. Options from classes assigned during normal classification:
157+
158+
a. ``ALL`` class
159+
b. Vendor classes
160+
c. Host classes
161+
d. Evaluated classes that do not depend on ``KNOWN`` class
162+
e. ``KNOWN`` and ``UNKNOWN`` classes
163+
f. Evaluated classes that depend on ``KNOWN`` class
164+
165+
6. Options from classes in ``evaluate-additional-classes`` from:
166+
167+
a. Pool
168+
b. Subnet
169+
c. Shared network
170+
171+
7. Global options
148172

149173
.. note::
150174

@@ -1324,7 +1348,7 @@ while clients that do not match "melon" will have a value of 456 for option
13241348
"foo".
13251349

13261350
It is possible to achieve an if-elseif-else effect but specifying an option
1327-
more than once with different class tags and values. Consider the following
1351+
more than once with different class tags and values. Consider the following
13281352
configuration for a subnet which provides three possible values for the
13291353
"server-str" option:
13301354

@@ -1348,10 +1372,10 @@ configuration for a subnet which provides three possible values for the
13481372
}]
13491373
}
13501374
1351-
Clients belonging to "class-one" will get a value of "string.one", clients
1375+
Clients belonging to "class-one" will get a value of "string.one", clients
13521376
belonging to "class-two" will get a value of "string.two", and clients that
1353-
belong to neither "class-one" nor "class-two" will get a value of
1354-
"string.other".
1377+
belong to neither "class-one" nor "class-two" will get a value of
1378+
"string.other".
13551379

13561380
.. note::
13571381

0 commit comments

Comments
 (0)