summaryrefslogtreecommitdiff
path: root/keama/tests/suffixdx4.in4
blob: fc692d109163bf5562eb0cf2d39e671a87c4cb7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# suffix data expression
# in fact ISC DHCP suffix can be reduced into Kea substring

# empty configs are not accepted by Kea
default-lease-time 1800;

# use suffix in a reductible match
class "reductible" {
    match suffix(option host-name, 3);
}

subclass "reductible" "com" {
    option domain-search "example.com";
}

subclass "reductible" "org" {
    option domain-search "example.org";
}

# reduce literals too
class "literal" {
    match if option domain-name = suffix("www.example.com", 3);
}

# raw
option domain-name = suffix(option domain-name, 3);