+++ /dev/null
-User-Name = "IpAddressSingleTunnel",
-NAS-IP-Address = "127.0.0.1",
--- /dev/null
+# We don't need delay since proxy flow will be finished
+# just after final CoA home server will return response.
+#delay 2.5
+Received CoA-ACK
+Acct-Session-Id = "default:pre-proxy" "coa_tls:recv-coa" "proxy-originate-coa-relay:pre-proxy" "coa:recv-coa" "coa:send-coa" "proxy-originate-coa-relay:post-proxy-coa-ack" "coa_tls:send-coa" "default:post-proxy-coa-ack"$
+
--- /dev/null
+User-Name = "TcpSessionKey-Proxy",
+Called-Station-Id = "key0"
+++ /dev/null
-delay 2.5
-Received CoA-ACK
-Acct-Session-Id = "coa-buffered-reader:accounting:coa-request" "default:pre-proxy" "coa_tls:recv-coa" "proxy-originate-coa-relay:pre-proxy" "coa:recv-coa" "coa:send-coa" "proxy-originate-coa-relay:post-proxy-coa-ack" "coa_tls:send-coa" "default:post-proxy-coa-ack"
-
User-Name = "PostAuthCoA",
+Called-Station-Id = "key0",
Each test is a pair of two files ending with \*.request and \*.reply.
+To run these tests separately, make sure you run 'make test' from the root
+directory beforehand.
+
Request files.
==============
if(User-Name && User-Name == "PostAuthCoA") {
update coa {
&Acct-Session-Id += "default:post-auth"
+ &Proxy-To-Originating-Realm := &Called-Station-Id
}
}
}
server coa {
recv-coa {
+
update request {
COA-Packet-Type := "%{Packet-Type}"
}
- detail_coa.accounting
+
+ if(&User-Name == "TcpSessionKey-Proxy") {
+ # Proxying CoA
+ update control {
+ &Proxy-To-Originating-Realm := &Called-Station-Id
+ }
+ } else {
+ # Originating CoA
+ detail_coa.accounting
+ }
}
}
}
case "TcpSessionKey"{
update {
- coa:Originating-Realm-Key := &Called-Station-Id
+ coa:Proxy-To-Originating-Realm := &Called-Station-Id
}
}
}
cipher_list = "DEFAULT"
}
- coa {
+ recv_coa {
virtual_server = coa_tls
}
}
$BIN_PATH/radclient -f $TEST_NAME.request -xF -D ./ 127.0.0.1:$PORT $TYPE $SECRET 1> $OUTPUT
-delay=$(grep delay $TEST_NAME.reply | awk '{print $2}')
-
-sed '/delay/d' $TEST_NAME.reply > $TEST_NAME.reply.tmp
+# skip comments
+sed '/^\s*#/d' $TEST_NAME.reply > $TEST_NAME.reply.tmp
+# wait if needed
+delay=$(grep delay $TEST_NAME.reply.tmp | awk '{print $2}')
+sed '/delay/d' $TEST_NAME.reply.tmp > $TEST_NAME.reply.tmp
sleep $delay 2>&1 > /dev/null
cat radclient.log > $RES