blob: 4230c57a725d5af43772332e99390062ac535204 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#
# PRE: update if
#
update {
control:Cleartext-Password := 'hello'
request:Tmp-String-0 := "This is a string"
request:Tmp-String-0 += "This is another one"
request:Tmp-Octets-0 := 0x000504030201
request:Tmp-Integer-0 := 7331
request:Tunnel-Private-Group-Id:5 = 127.0.0.1
reply:Filter-Id = 'filter'
}
if ("%{pairs:request:}" != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331, Tunnel-Private-Group-Id:5 = \"127.0.0.1\"") {
update reply {
Filter-Id += 'fail 1'
}
}
if ("%{pairs:Tmp-String-0}" != "Tmp-String-0 = \"This is a string\"") {
update reply {
Filter-Id += 'fail 2'
}
}
if ("%{pairs:Tmp-String-0[*]}" != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") {
update reply {
Filter-Id += 'fail 3'
}
}
if ("%{pairs:control:}" != "Cleartext-Password = \"hello\"") {
update reply {
Filter-Id += 'fail 4'
}
}
if ("%{pairs:control:User-Name}" != '') {
update reply {
Filter-Id += 'fail 5'
}
}
|