summaryrefslogtreecommitdiff
path: root/keama/tests/substringdx4.in4
blob: ed0c9d3535d55f4ec998c8904b49b17c482fa2b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# substring data expression

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

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

subclass "reductible" "www" { }

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

# raw
option domain-name = substring(option domain-name, 4, 1000);