# Try calling these xlats in mapping too, they may get optimised to VPTs which is a
# different code path.
-update request {
- &Tmp-IP-Address-1 += "%{Tmp-IP-Address-0[1]}"
- &Tmp-IP-Address-1 += "%{Tmp-IP-Address-0[0]}"
+&request += {
+ &Tmp-IP-Address-1 = "%{Tmp-IP-Address-0[1]}"
+ &Tmp-IP-Address-1 = "%{Tmp-IP-Address-0[0]}"
&Tmp-String-0 = "%(concat:%{Tmp-IP-Address-0[*]} ,)"
&Tmp-Integer-0 = "%{Tmp-IP-Address-0[#]}"
}
#
-# PRE: update if
+# PRE: if
#
-update request {
- &Tmp-String-0 := "%(config:modules.test.boolean)"
-}
-
+&Tmp-String-0 := "%(config:modules.test.boolean)"
if (&Tmp-String-0 != "no") {
test_fail
}
-update request {
- &Tmp-String-0 := "test"
-}
-
-update request {
- &Tmp-Integer-0 := "%(config:modules.%{Tmp-String-0}.integer)"
-}
-
+&Tmp-String-0 := "test"
+&Tmp-Integer-0 := "%(config:modules.%{Tmp-String-0}.integer)"
if (&Tmp-Integer-0 != 1) {
test_fail
}
"%(delay_10s:)" # Should 'blip' the request
-update request {
- &Tmp-Float-0 := "%(delay_10s:0.1)"
-}
-
+&Tmp-Float-0 := "%(delay_10s:0.1)"
if (!&Tmp-Float-0) {
fail
}
#
-# PRE: update
# PROTOCOL: dhcpv4
#
-update control {
- &Tmp-Octets-0 := 0x520d0103abcdef0206010203040506
-}
-
-if ("%(decode.dhcpv4:%{control.Tmp-Octets-0})" != 2) {
+&Tmp-Octets-0 := 0x520d0103abcdef0206010203040506
+if ("%(decode.dhcpv4:%{Tmp-Octets-0})" != 2) {
test_fail
}
test_fail
}
-update control {
- &Tmp-Octets-1 := "%(encode.dhcpv4:&request[*])"
-}
-
-if ( &control.Tmp-Octets-1 != 0x520d0103abcdef0206010203040506 ) {
+&Tmp-Octets-1 := "%(encode.dhcpv4:&request[*])"
+if ( &Tmp-Octets-1 != 0x520d0103abcdef0206010203040506 ) {
test_fail
}