+operators
+ EAP-Message =* ANY,
+ State =* ANY,
+ Message-Authenticator =* ANY,
+ Error-Cause =* ANY,
+ Reply-Message =* ANY,
+ Vendor-Specific.Microsoft.CHAP-Error =* ANY,
+ Proxy-State =* ANY,
+ Error-Cause =* ANY,
+ User-Name =* ANY,
+ User-Password =* ANY,
+ NAS-Port < 99,
+ Idle-Timeout < 100,
+ Called-Station-Id == "bar",
+ Service-Type >= 5,
+ Framed-IP-Address > 192.168.0.0,
+ Calling-Station-Id <= "jim"
+
DEFAULT
EAP-Message =* ANY,
State =* ANY,
--- /dev/null
+#
+# Input packet
+#
+Packet-Type = Access-Request
+User-Name = "operators"
+User-Password = "goodbye"
+NAS-Port = 10
+Idle-Timeout = 300
+Called-Station-Id = "foo"
+Called-Station-Id = "bar"
+Service-Type = 5
+Service-Type = 1
+Framed-IP-Address = 10.0.0.20
+Framed-IP-Address = 192.168.10.20
+Reply-Message = 'success'
+Calling-Station-Id = "bob"
+Calling-Station-Id = "jim"
+Calling-Station-Id = "ted"
+
+#
+# Expected answer
+#
+Packet-Type == Access-Accept
+Reply-Message == 'success'
--- /dev/null
+attr_filter
+
+if ((!&NAS-Port) || (&NAS-Port != 10)) {
+ test_fail
+}
+
+if (&Idle-Timeout) {
+ test_fail
+}
+
+if ((&Called-Station-Id != "bar") || (&Called-Station-Id[1])) {
+ test_fail
+}
+
+if ((&Service-Type != 5) || (&Service-Type[1])) {
+ test_fail
+}
+
+if ((&Framed-IP-Address != 192.168.10.20) || (&Framed-IP-Address[1])) {
+ test_fail
+}
+
+if ((&Calling-Station-Id != "bob") || (&Calling-Station-Id[1] != "jim") || (&Calling-Station-Id[2])) {
+ test_fail
+}
+
+update control {
+ &Password.Cleartext := "goodbye"
+}
+
+update reply {
+ &Reply-Message := &request.Reply-Message
+}