summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/unknown
blob: eb9659123ae4d55ac37b59c9783aaf03e5f97c98 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#
#  PRE: wimax
#
update control {
       Cleartext-Password := 'hello'
}

update reply {
	Filter-Id := "filter"
}

update request {
	FreeRADIUS-Proxied-To  := 127.0.0.2
}

#
#  Check that a known but malformed attr is malformed
#
update request {
	Attr-26.24757.84.9.5.7 = 0xab
}

if (&Attr-26.24757.84.9.5.7 != 0xab) {
	update reply {
		Filter-Id += 'Fail 1'
	}
}

#
#  Check that an unknown attr is OK
#
update request {
       Attr-26.24757.84.9.5.15 = 0xabcdef
}

if (&Attr-26.24757.84.9.5.15 != 0xabcdef) {
	update reply {
		Filter-Id += 'Fail 2'
	}
}

#
#  Check that unknown attributes which are defined
#  get automatically resolved to the real attribute.
#
if (&Vendor-11344-Attr-1 == 127.0.0.1) {
	update reply {
		Filter-Id += 'Fail 3'
	}
}

if (&Vendor-11344-Attr-1 != 127.0.0.2) {
	update reply {
		Filter-Id += 'Fail 4'
	}
}

update request {
	&Vendor-11344-Attr-1 := 127.0.0.1
}

if (&FreeRADIUS-Proxied-To == 127.0.0.2) {
	update reply {
		Filter-Id += 'Fail 5'
	}
}

if (&FreeRADIUS-Proxied-To != 127.0.0.1) {
	update reply {
		Filter-Id += 'Fail 6'
	}
}

if (&Vendor-11344-Attr-1 == 127.0.0.2) {
	update reply {
		Filter-Id += 'Fail 7'
	}
}

if (&Vendor-11344-Attr-1 != 127.0.0.1) {
	update reply {
		Filter-Id += 'Fail 8'
	}
}